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

Get all Contact Fields

Get all Contact Fields existing in your account

get
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

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.

get/api/contacts/fields
curl -X GET https://mailtrap.io/api/contacts/fields \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 6730,
    "name": "First name",
    "data_type": "text",
    "merge_tag": "first_name"
  },
  {
    "id": 6731,
    "name": "Birthdate",
    "data_type": "date",
    "merge_tag": "birthdate"
  },
  {
    "id": 6732,
    "name": "Cats count",
    "data_type": "integer",
    "merge_tag": "cats_count"
  }
]

Last updated

Was this helpful?