folkwaysDocs
Realtime API

Transports

WebSocket, HTTP publish and HTTP long-polling, which to use when, and WebTransport, which is planned.

The Realtime API serves every transport on one host, over TLS on port 443, so it works on networks that allow only HTTPS. All transports share the same tokens, frames and error codes.

Your client reaches the Realtime API on one host with TLS on port 443 over WebSocket at GET /v1/ws, for live delivery both ways; HTTP publish at POST /v1/publish, to publish without a connection; and HTTP long-poll at POST /v1/poll, to receive where WebSockets are blocked. WebTransport over HTTP/3 is planned and not available yet.
TransportEndpointDirectionUse it for
WebSocketwss://…/v1/wsBoth, liveApps and browsers: publishing, subscribing, presence
HTTP publishPOST https://…/v1/publishClient to serverBackends, serverless functions, scripts; clients without a socket
HTTP long-pollPOST https://…/v1/pollServer to clientReceiving where WebSockets are blocked by a proxy or firewall
WebTransportPlanned. Not available yet

WebSocket

The default for apps. One connection carries many topics in both directions, with live delivery, presence and token refresh. See WebSocket.

HTTP publish

A stateless POST with a token in the Authorization header and up to 64 publishes in the body. Nothing to keep open, so it suits backends and serverless functions. It can't subscribe. See POST /v1/publish.

HTTP long-poll

A stateless read: send cursors, get events after them, waiting up to 25 seconds for something new. Use it where WebSockets don't get through. It doesn't count toward presence, and signals between polls are best effort. See POST /v1/poll.

The JavaScript SDK uses WebSocket first and falls back to long-polling plus HTTP publish after repeated WebSocket failures, then tries WebSocket again later. See Connection.

WebTransport (planned)

WebTransport over HTTP/3 (QUIC) is planned as another transport for apps. It isn't available yet and has no release date; this page will say when it is. Build on WebSocket and HTTP today.

Turning transports off

A segment can refuse a transport: see Transports in the Console.

On this page