Sendry Docs
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

FieldTypeRequiredDescription
namestringYesEvent name (1-200 characters).
event_idstringNoCaller-supplied idempotency key (max 200 characters).
contact_emailstringNoEmail of the contact to attribute the event to.
contact_idstringNoID of the contact to attribute the event to.
payloadobjectNoArbitrary 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

ParameterTypeDefaultDescription
limitnumber50Results per page (max 100).
cursorstringPagination cursor from the previous response's next_cursor.
namestringFilter 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
}

On this page