Skip to content

Realtime

See Concepts → Realtime for the pub/sub model behind these two endpoints.

Content-Type: text/event-stream. The first event, PB_CONNECT, carries { "clientId": "..." }. Every subsequent message event carries { "action": "create" | "update" | "delete", "record": { ... } } for whatever topics the client has subscribed to. The connection stays open until the client disconnects.

{ "clientId": "abc123...", "subscriptions": ["posts", "posts/RECORD_ID"] }

A bare collection name subscribes to every change in it (filtered by that collection’s listRule per-event); collection/recordId subscribes to one record only. 204 on success; 404 if clientId names a connection that’s already closed. Calling this again with a new subscriptions array replaces the client’s subscription set — it does not merge with a previous call.

Two realtime event kinds outside this pub/sub model ride the same GET /realtime connection: llm_chunk/llm_done/llm_error from the LLM chat gateway, keyed by clientId rather than a collection subscription.