---
title: "SSE sync stream (continuous push)"
method: GET
path: "/api/im/sync/stream"
tags: ["IM-Sync"]
---

# SSE sync stream (continuous push)

`GET /api/im/sync/stream`

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.

## Query parameters

- `token` string, required
- `since` string

## Response `200`

SSE event stream

## Other responses

- `401` — Unauthorized — invalid or expired JWT

---

[API](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api.md) · [All operations](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prismer-ai/prismer-cloud-api/revisions/7fef0836d17f/schema)
