Read or stream events
Returns a page of retained events as JSON, or streams history and live updates when called with Accept: text/event-stream. Pass after (or Last-Event-ID) with the last retained event's cursor to resume from a known position. Returns 409 cursor_unavailable if the cursor points to an unsynced tail lost during restore.
/sessions/{id}/eventsAuthorization
bearer In: header
Path Parameters
Opaque session ID.
^[a-fA-F0-9]{32}$Query Parameters
Opaque cursor from the last retained event.
Maximum number of items to return (JSON mode).
1 <= value <= 1000100Header Parameters
SSE reconnect cursor (used when the after query parameter is omitted).
Response Body
application/json
curl -X GET "https://example.com/sessions/string/events" \ -H "Authorization: Bearer YOUR_TOKEN"{ "events": [ { "cursor": "string", "data": null, "id": "string", "input_id": "string", "time": "2019-08-24T14:15:22Z", "type": "string" } ], "next_cursor": "string"}Close a session POST
Permanently closes a session and stops any active or queued work. Requires a management token. Event history remains readable.
Send input POST
Queues a user.message (with text and an optional idempotency key) or requests an interruption with user.interrupt. Returns 202 Accepted once the input is recorded locally.