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

Update contact

Update contact using UUID or email (URL encoded)

patch
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
contact_identifierstring · uuid or emailRequired

Contact UUID or Email

Example: 018dd5e3-f6d2-7c00-8f9b-e5c3f2d8a132
Body
Responses
200

OK.

application/json
actionstring · enumOptional

Performed action on the contact:

  • "created" if contact does not exist
  • "updated" if contact exists
Possible values:
patch/api/contacts/{contact_identifier}
curl -X PATCH https://mailtrap.io/api/contacts/{contact_identifier} \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"contact": { "email": "new@example.com", "fields": {"first_name": "John"}}}'
{
  "action": "updated",
  "data": {
    "id": "018dd5e3-f6d2-7c00-8f9b-e5c3f2d8a132",
    "status": "subscribed",
    "email": "john.smith@example.com",
    "fields": {
      "first_name": "John",
      "last_name": "Smith"
    },
    "list_ids": [
      1,
      2,
      3
    ],
    "created_at": 1740659901189,
    "updated_at": 1742903266889
  }
}

Last updated

Was this helpful?