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

Create Contact Field

Create new Contact Fields. Please note, you can have up to 40 fields.

post
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Body
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.

Responses
201

Contact Field Created.

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.

post/api/contacts/fields
curl -X POST https://mailtrap.io/api/contacts/fields \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Company", "data_type": "text", "merge_tag": "company"}'
{
  "id": 26730,
  "name": "My Contact Field",
  "data_type": "text",
  "merge_tag": "my_contact_field"
}

Last updated

Was this helpful?