Skip to content

Org-wide live activity stream (SSE)

GET
/activity/stream
curl --request GET \
--url https://your-org.evershell.ai/v1/activity/stream \
--header 'Authorization: Bearer <token>'

Permissions: workspace:read or workspace:read:own — callers with the unscoped variant receive every workspace’s events; :own callers receive only events from workspaces they created (handler filters per event by user_id).

Server-sent events. Pushes every category=activity event across the caller’s org as it’s emitted. Filter the stream client-side or by workspace via /workspaces/{id}/activity/stream. The CP holds the connection open up to sseMaxStreamDuration (5 minutes today) then closes it cleanly so browsers’ EventSource can auto-reconnect; clients that aren’t EventSource should reconnect on close.

Heartbeats are sent as SSE comment lines (: heartbeat\n\n) roughly every 15 seconds.

SSE consumers that can’t set headers may present the API key in the query string: ?api_key=sk_live_....

api_key
string

API key fallback for SSE clients that can’t set Authorization headers.

Event stream

Media type text/event-stream

Each event has shape event: activity\nid: <event id>\ndata: <JSON AuditEvent>\n\n. See the AuditEvent schema for the payload shape.

string