For the complete documentation index, see llms.txt. This page is also available as Markdown.

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: 1Required

Unique Contact Field ID

Example: 3229
Body
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.

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?