Stream insights (SSE)
Insights
Stream insights (SSE)
Stream real-time insights via Server-Sent Events (SSE). On connect, recent insights are replayed as ‘insight.replay’ events (up to 20). New insights arrive as ‘insight.batch.created’ events. Keepalive comments are sent every 30 seconds.
GET
Stream insights (SSE)
This endpoint requires the
insight.stream scope on your API key.Connection Behavior
- On connect, a comment is sent:
: connected workspace_id=... token_id=... - Recent insights are replayed as
insight.replayevents (up to 20) - Keepalive comments (
: keepalive) are sent every 30 seconds - New insights arrive as
insight.batch.createdevents in real-time
Example
Event Types
| Event | Description |
|---|---|
insight.batch.created | Real-time: new insights just discovered |
insight.replay | Historical: recent insights sent on connection |
Event Format
Authorizations
API key for authentication (format: "Bearer YOUR_API_KEY")
Response
SSE event stream of insights
Server-Sent Events stream. Events: 'insight.batch.created' (real-time new insights), 'insight.replay' (historical replay on connect). Each event's data field contains a JSON object with workspace, insights array, insight_count, and emitted_at.
Last modified on February 17, 2026