Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

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.

GET/api/v2/stream
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Query parameters
cursorstring

Resume after this event id (alternative to the Last-Event-ID header).

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

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.

string
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/stream' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
"string"