API Reference
Events
Ingest custom events that trigger automations, and list or retrieve them.
Events are custom activity records you send to Sendry to trigger automations, such as order.completed or trial.started. An event can be tied to a contact by email or contact ID; events without a contact are stored but do not fire automations.
Ingest event
POST /v1/events
Requires sending_access scope. Optional event_id is used for idempotency: a duplicate event_id returns the original event with deduped: true.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Event name (1-200 characters). |
event_id | string | No | Caller-supplied idempotency key (max 200 characters). |
contact_email | string | No | Email of the contact to attribute the event to. |
contact_id | string | No | ID of the contact to attribute the event to. |
payload | object | No | Arbitrary JSON payload; defaults to {}. |
Example request
{
"name": "order.completed",
"event_id": "order.completed.10023",
"contact_email": "jane@example.com",
"payload": {
"order_id": "10023",
"total": 129.0
}
}
Response
{
"id": "evt_abc123",
"external_id": "order.completed.10023",
"name": "order.completed",
"contact_email": "jane@example.com",
"contact_id": null,
"payload": { "order_id": "10023", "total": 129.0 },
"received_at": "2025-03-12T09:00:00Z",
"processed_at": "2025-03-12T09:00:01Z",
"triggered_runs": 2
}
A retried event returns the original row with an extra deduped field:
{
"id": "evt_abc123",
"external_id": "order.completed.10023",
"name": "order.completed",
"contact_email": "jane@example.com",
"contact_id": null,
"payload": { "order_id": "10023", "total": 129.0 },
"received_at": "2025-03-12T09:00:00Z",
"processed_at": "2025-03-12T09:00:01Z",
"triggered_runs": 2,
"deduped": true
}
List events
GET /v1/events
Requires read_only scope. Results are ordered by received_at, newest first.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Results per page (max 100). |
cursor | string | Pagination cursor from the previous response's next_cursor. | |
name | string | Filter by exact event name. |
Response
{
"data": [
{
"id": "evt_abc123",
"external_id": "order.completed.10023",
"name": "order.completed",
"contact_email": "jane@example.com",
"contact_id": null,
"payload": { "order_id": "10023", "total": 129.0 },
"received_at": "2025-03-12T09:00:00Z",
"processed_at": "2025-03-12T09:00:01Z",
"triggered_runs": 2
}
],
"has_more": false,
"next_cursor": null
}
Get event
GET /v1/events/:id
Requires read_only scope.
Response
{
"id": "evt_abc123",
"external_id": "order.completed.10023",
"name": "order.completed",
"contact_email": "jane@example.com",
"contact_id": null,
"payload": { "order_id": "10023", "total": 129.0 },
"received_at": "2025-03-12T09:00:00Z",
"processed_at": "2025-03-12T09:00:01Z",
"triggered_runs": 2
}