List fields
Returns a list of all of your account’s custom fields.Endpoint
GET /v3/custom_fields
Parameters
Your account API key
Create field
Create a custom field for your account. The label field must be unique to your account. Whitespace will be removed from the beginning and the end of your label. Additionally, a key field and a name field will be generated for you. The key is an ASCII-only, lowercased, underscored representation of your label. This key must be unique to your account. Keys are used in personalization tags in sequences and broadcasts. Names are unique identifiers for use in the HTML of custom forms. They are made up of a combination of ID and the key of the custom field prefixed with “ck_field”. A maximum of 140 custom fields are allowed. Requests that exceed this limit will return a response of400
.
Endpoint
POST /v3/custom_fields
Parameters
Your API secret key
The label(s) of the custom field. Can be a single string or an array of strings for multiple fields.
Update field
Updates a custom field label (see Create field above for more information on labels). Note that the key will change but the name remains the same when the label is updated.An update to a custom field will break all of the liquid personalization tags in emails that reference it - e.g. if you update a
Zip_Code
custom field to Post_Code
, all liquid tags referencing {{ subscriber.Zip_Code }}
would no longer work and need to be replaced with {{ subscriber.Post_Code }}
.400
.
Endpoint
PUT /v3/custom_fields/#{custom_field_id}
Parameters
Your API secret key
The ID of the custom field you want to update
The new label for the custom field
Destroy field
Permanently delete a custom field. Note that this will remove all data in this field from your subscribers.Endpoint
DELETE /v3/custom_fields/#{custom_field_id}
Parameters
Your API secret key
The ID of the custom field you want to delete