Create a custom contact field
POST/api/v1/contact-fields
POST /contact-fields
curl -X POST 'https://www.unitpost.com/api/v1/contact-fields' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"key": "plan",
"label": "Plan",
"type": "text"
}'Response · 201
{
"object": "contact_field",
"id": "id_123",
"key": "string",
"label": "string",
"type": "text",
"default_value": "string",
"position": 0,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Define a new typed custom field that can then be set on any contact and used as a template variable (e.g. plan, signup_date). The key and type are fixed once created — rename the key later with Rename a custom field's key, or change the label with Update a custom contact field. See existing fields via List custom contact fields. Requires the contacts:write capability.
Request body4 fields
| Field | Type | Description |
|---|---|---|
keyrequired | string | — |
labelrequired | string | — |
type | enumtext | number | boolean | date | — |
default_value | object | — |
Response · 201 fields9 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
keyrequired | string | — |
labelrequired | string | — |
typerequired | enumtext | number | boolean | date | — |
default_valuerequired | object | — |
positionrequired | number | — |
created_atrequired | string | — |
updated_atrequired | string | — |
201401409422