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

Create contact event

Submit custom event for contact

post
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
namestring · max: 255Optional
Responses
201

OK.

application/json
contact_idstringOptional
contact_emailstringOptional
namestring · max: 255Optional
post/api/contacts/{contact_identifier}/events
curl -X POST https://mailtrap.io/api/contacts/{contact_identifier}/events \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "UserLogin", "params": {"user_id": 101, "is_active": true}}'
{
  "contact_id": "018dd5e3-f6d2-7c00-8f9b-e5c3f2d8a132",
  "contact_email": "john.smith@example.com",
  "name": "UserLogin",
  "params": {
    "user_id": 101,
    "user_name": "John Smith",
    "is_active": true,
    "last_seen": null
  }
}

Last updated

Was this helpful?