Skip to main content
GET
/
v1
/
insights
/
stream
Stream insights (SSE)
curl --request GET \
  --url https://app.nex.ai/api/developers/v1/insights/stream \
  --header 'Authorization: <api-key>'
"<string>"
This endpoint requires the insight.stream scope on your API key.

Connection Behavior

  1. On connect, a comment is sent: : connected workspace_id=... token_id=...
  2. Recent insights are replayed as insight.replay events (up to 20)
  3. Keepalive comments (: keepalive) are sent every 30 seconds
  4. New insights arrive as insight.batch.created events in real-time

Example

curl -N -s "https://app.nex.ai/api/developers/v1/insights/stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: text/event-stream"

Event Types

EventDescription
insight.batch.createdReal-time: new insights just discovered
insight.replayHistorical: recent insights sent on connection

Event Format

event: insight.batch.created
data: {"workspace":{...},"insights":[...],"insight_count":3,"emitted_at":"2026-02-07T10:30:00Z"}

Authorizations

Authorization
string
header
required

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