Events
What your contacts do in your product, for filters and sequences.
- POST /events — Track an event
post/events— Track an event
Records what a contact did (a purchase, a login). The event belongs to the address in your workspace, for every newsletter it is subscribed to. Kept 13 months. Needs a full_access key: a signups key is refused (it lives in public code). An unknown address answers 404 unless create_contact: true.
Keys: full_access · accepts Idempotency-Key
Body
| string | Give `email` or `contact_id`. | |
| contact_id | uuid | |
| eventrequired | string | Name like `purchase` or `trial.started` (letters, digits, `_ . : -`). `email.` and `contact.` are reserved. |
| properties | object | Free JSON object, 4 KB max. |
| occurred_at | datetime | Defaults to now. Up to 13 months back, 1 hour ahead. |
| create_contact | boolean | Create the contact when the address is unknown (as `POST /contacts`). Default `false`: 404. |
| segment_id | uuid | Newsletter of a contact created with `create_contact`. |
curl -X POST https://api.smartletter.ai/events \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","event":"purchase","properties":{"plan":"pro","amount":49}}'Response 201
{
"object": "event",
"id": "1d7c3a90-0000-4000-8000-000000000008",
"email": "[email protected]",
"event": "purchase",
"properties": {
"plan": "pro",
"amount": 49
},
"occurred_at": "2026-10-17T09:00:00.000Z",
"contact_created": false
}