Contact Events
Track contact interactions
Manage contact events
Submit custom event for contact
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
contact_identifierstring · uuid or emailRequiredExample:
Contact UUID or Email
018dd5e3-f6d2-7c00-8f9b-e5c3f2d8a132Body
namestring · max: 255Optional
Responses
201
OK.
application/json
contact_idstringOptional
contact_emailstringOptional
namestring · max: 255Optional
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Resource not found
application/json
422
Returns validation errors.
application/json
429
Rate limit exceeded for the current account.
application/json
500
Internal error. Retry later or contact support.
application/json
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?

