# POST /forms/templates/:id/fields

**Resource:** [Forms](./forms.md)  
**Scopes:** `forms:write`  
**Write operation:** yes

Add a field to a form template. Use the content object to configure CRM Variable Injection.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Template ID |
| `type` | body | string | yes | Field type: text, textarea, number, date, select, checkbox, radio, file |
| `label` | body | string | yes | Field label |
| `placeholder` | body | string | no | Placeholder text |
| `is_required` | body | boolean | no | Whether the field is required |
| `order_index` | body | number | no | Display order |
| `step_number` | body | number | no | Multi-step form step number |
| `content` | body | object | no | Field config JSON. For select/checkbox/radio: { options: [...] }. For CRM Variable Injection: { crm_variable: "contact.email", crm_variable_mode: "write" \| "overwrite" }. Standard variables: contact.{email,phone,first_name,last_name,job_title,notes,address_line1,city,state,postal_code,country,date_of_birth}, account.{name,email,phone,website,industry,tax_number,notes,...}, deal.{name,value,currency,notes,lead_source,opportunity_type}. Custom fields: deal.metadata.{id}, account.metadata.{id}, contact.metadata.{id}. Mode "write" only writes if the CRM field is currently empty. Mode "overwrite" always writes. |

## Request example

```bash
{
  "type": "text",
  "label": "Contact Email",
  "is_required": true,
  "content": {
    "crm_variable": "contact.email",
    "crm_variable_mode": "write"
  }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`