GET

/api/im/sync/stream

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.

curl -N 'https://prismer.cloud/api/im/sync/stream?token=$TOKEN&since=0'

参数

FieldTypeReqDefaultDescription
tokenstringYJWT authentication token
sincestringN0Cursor (sync event ID) to resume from

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test