Update Contact Field
Update existing Contact Field. Please note, you cannot change data_type of the field.
patch
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
field_idinteger · int64 · min: 1RequiredExample:
Unique Contact Field ID
3229Body
namestring · max: 80Optional
merge_tagstring · max: 80Optional
Personalize your campaigns by adding a merge tag. This field will be replaced with unique contact details for each recipient.
Responses
200
OK.
application/json
idintegerOptional
namestring · max: 80Optional
data_typestring · enumOptionalPossible values:
merge_tagstring · max: 80Optional
Personalize your campaigns by adding a merge tag. This field will be replaced with unique contact details for each recipient.
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Resource not found
application/json
422
Returns validation errors.
application/json
429
Rate limit exceeded for the current account.
application/json
500
Internal error. Retry later or contact support.
application/json
patch/api/contacts/fields/{field_id}
curl -X PATCH https://mailtrap.io/api/contacts/fields/{field_id} \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "Updated Name", "merge_tag": "updated_name"}'
{
"id": 6730,
"name": "Updated name",
"data_type": "text",
"merge_tag": "updated_name"
}Last updated
Was this helpful?

