Skip to content
simailDocsv0

API reference

Events

GET /v0/events, GET /v0/inboxes/{inbox_id}/events and the WebSocket endpoint — parameters, responses and errors.

docs.simail.ai/api/events

Payloads and types: Event types. How to poll reliably: Polling events.

GET/v0/events

Permission event_read.

Query parameterNotes
aftercursor from next_cursor; omit to start from the oldest retained event
typescomma-separated event types
inbox_idscomma-separated inbox IDs within your scope
limit1–200, default 50

200 OK: { "count", "limit", "events": [ … ], "next_cursor" }. count is the number of events in this page. next_cursor is omitted on the last page; keep your previous cursor and poll again later (the tail events come back again: de-duplicate on event_id).

StatuscodeWhen
400validation_errorthe cursor belongs to another key scope or organization (reason: page_token_invalid)
403missing_permissionno event_read
410gonethe cursor is older than the 30-day retention
GET/v0/inboxes/{inbox_id}/events

Permission event_read. This is the per-inbox label log, not the domain event stream: it lists the label.added and label.removed records of one inbox, newest first, at most the latest 50. It takes no query parameters and has no cursor, so limit, after, types and next_cursor do not apply here. For paged, filterable domain events use GET /v0/events (its inbox_ids parameter narrows it to one inbox).

{
"events": [
{ "id": "evt_01JZX4F0G1H2J3K4M5N6P7Q8R9", "type": "label.added", "message_id": "msg_01JZX3S5V7W9X1Y3Z5A7B9C1D3", "thread_id": null, "label": "read", "created_at": "2026-10-18T17:02:13.000Z" }
]
}
GETwss://api.simail.ai/v0/ws

Permission event_read. Upgrades to a WebSocket. See Realtime.

Close codeMeaning
1000 (expired)the 1-hour connection lifetime ran out; reconnect and authenticate again
1008 (slow)you fell more than 1 MiB behind; reconnect and catch up with GET /v0/events
1011 (send_failed)the server could not write to the socket; reconnect with backoff
4401 (revoked)the key was revoked or narrowed, the member was removed, or the organization was paused; do not keep retrying with this key. Call GET /v0/auth/me first: if the key still works (for example the organization was resumed) you may reconnect