Realtime Events
Subscribe to workspace events with Server-Sent Events.
Realtime events are delivered from:
The response is text/event-stream. Each event has event: <type> and JSON
data matching the WorkspaceEvent schema in the OpenAPI spec.
Event types
| Event type | Required scope |
|---|---|
session.created | torqee:sessions:read |
session.status_changed | torqee:sessions:read |
transcript.segment.created | torqee:transcripts:read |
When filters is omitted, Connect subscribes to lifecycle events
(session.created and session.status_changed) and filters them by the scopes
the credential already has.
Filters
The filters query parameter is a URL-encoded JSON array. Entries are
OR-matched. Each entry has a type, and transcript.segment.created also
requires sessionId.
Browser EventSource cannot set an Authorization header directly. Use an SSE
client that supports headers, or stream the response with fetch:
Cost and limits
Filters are limited to 20 entries. Each entry costs 10, and the current budget is 100. Requests above the budget return:
Too many concurrent streams for the same workspace return:
Event delivery is best-effort. Events emitted while the client is disconnected are not replayed. Reconnect with backoff and reconcile missed state through the REST API.