Contact fields

Rename a custom field's key

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.

post/contact-fields/{id}/rename

Request

  • Base URL: https://www.unitpost.com/api/v1
  • URL: https://www.unitpost.com/api/v1/contact-fields/{id}/rename
  • Auth: HTTP bearer

Request body

keystring required

Response

The renamed contact field.

object'contact_field' required
idstring required
keystring required
labelstring required
type'text' | 'number' | 'boolean' | 'date' required
default_valuestring nullable required

The value used for any contact that has none for this field (key missing or null): when an email is sent (merge tags) and when segments are evaluated. It's never written onto contacts, so changing it takes effect everywhere at once. Stored as a string and coerced to the field's type; null means no default. In segment filters, is_set / is_not_set check whether the contact itself has a value.

positionnumber required
created_atstring required
updated_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.