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.
List events
Section titled “List events”/v0/eventsPermission event_read.
| Query parameter | Notes |
|---|---|
after | cursor from next_cursor; omit to start from the oldest retained event |
types | comma-separated event types |
inbox_ids | comma-separated inbox IDs within your scope |
limit | 1–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).
| Status | code | When |
|---|---|---|
| 400 | validation_error | the cursor belongs to another key scope or organization (reason: page_token_invalid) |
| 403 | missing_permission | no event_read |
| 410 | gone | the cursor is older than the 30-day retention |
Inbox events
Section titled “Inbox events”/v0/inboxes/{inbox_id}/eventsPermission 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" } ]}WebSocket
Section titled “WebSocket”wss://api.simail.ai/v0/wsPermission event_read. Upgrades to a WebSocket. See Realtime.
| Close code | Meaning |
|---|---|
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 |