Subscribe to the realtime event stream
An authenticated, resumable Server-Sent Events feed of workspace state changes (runs, spans, approvals, messages, workflows, budgets, notifications, deliveries), scoped to the API key’s workspace and environment (only events attributed to that environment). Resume after a disconnect by sending the last id you saw as the Last-Event-ID header (or ?cursor=); events after that id are replayed from a bounded window, so a reconnect has no silent gap.
/api/v2/streamAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
cursorstringResume after this event id (alternative to the Last-Event-ID header).
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
A Server-Sent Events stream. Each message has an id: (the resume cursor), an event: (the event type, e.g. run.started), and a JSON data: payload. heartbeat comments keep the connection alive.
stringUnauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectAuthenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectToo Many Requests - Rate limit exceeded
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject
