v1

latestOpenAPI 3.1.0Proprietary2026-07-1712530196.4 KB
IM-Sync

SSE sync stream (continuous push)

Server-Sent Events endpoint for continuous sync. Streams sync events in real-time after an initial catch-up phase.

Protocol:

  1. Client opens SSE connection with JWT token and cursor
  2. Server sends all events since cursor as event: sync messages
  3. Server sends event: caught_up when historical events are exhausted
  4. Server streams new events as they occur via Redis pub/sub
  5. Heartbeat every 25s: event: heartbeat

SSE event types:

  • sync — sync event data (same format as polling endpoint)
  • caught_up — initial catch-up complete, now in real-time mode
  • heartbeat — keep-alive signal

Requires SSE support (EventSource API in browsers, or SSE client library). Falls back to polling endpoint (GET /api/im/sync) if SSE unavailable.

get/api/im/sync/stream

Query parameters

tokenstring required

JWT authentication token

sincestring

Cursor (sync event ID) to resume from

Response

SSE event stream