Stream session events
⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/sessions/{session_id}/streamFollow a session live as server-sent events. Each event has an id: line and a data: line of JSON. Reconnect with Last-Event-ID to resume without gaps (events are kept for replay for 24 hours). A : keep-alive comment arrives every 15 seconds; the server closes the stream after 10 minutes, and you reconnect.
For how this fits into a full workflow, see Sessions.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
syntic-beta | Yes, while in preview | agents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | The session id, starting with sesn_. |
Body
No body. Optional request header Last-Event-ID resumes after that event.
Response
200 OK, Content-Type: text/event-stream
id: evt_01JC7M3A
data: {"type":"status.changed","status":"running","outcome":null}
id: evt_01JC7M3B
data: {"type":"tool_call.started","tool_call_id":"call_7","name":"lookup_order","arguments":{"order_id":"88123"},"executor":"client"}
id: evt_01JC7M3C
data: {"type":"status.changed","status":"requires_action","outcome":null}Event types:
type | Payload |
|---|---|
status.changed | status, outcome |
message.delta | message_id, delta |
message.completed | message_id, content |
tool_call.started | tool_call_id, name, arguments, executor (syntic or client) |
tool_call.completed | tool_call_id, output (up to 8 KB), is_error, duration_ms |
approval.required | tool_call_id, name, arguments |
usage.updated | usage |
error | error in the standard envelope |
The list will grow over time, so skip any type your code does not recognise.
Examples
curl -sSN https://app.syntic.ai/v1/sessions/sesn_01JC7M2K4P6R8T0V2X4Z/stream \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01" \
-H "Last-Event-ID: evt_01JC7M3B"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 404 | not_found_error | session_not_found | No session with that id in this workspace. |
| 429 | rate_limit_error | too_many_streams | More than 5 open streams on this session. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Related
Was this page helpful?