Rename a custom field's key
POST/api/v1/contact-fields/{id}/rename
POST /contact-fields/{id}/rename
curl -X POST 'https://www.unitpost.com/api/v1/contact-fields/cf_123/rename' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"key": "subscription_plan"
}'Response · 200
{
"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"
}Change a custom field's key, migrating the stored value on every contact so no data is lost. Because the key is how templates and the API reference the field, update any template variables that used the old key. To change only the display label, use Update a custom contact field. Requires the contacts:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Request body1 field
| Field | Type | Description |
|---|---|---|
keyrequired | string | — |
Response · 200 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 | — |
200401404409422