Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Protocols and formats

Prefer an official SDK. The wire is not a JSON RPC.

WebSocket

Control is text lines. Publish and deliver are binary frames.

Typical text:

  • client SUB:tenant:pattern
  • client UNSUB:tenant:pattern
  • server OK:SUB:tenant:pattern / OK:UNSUB:tenant:pattern
  • server ERR:...
  • optional PING / PONG for socket RTT (not the same as HTTP GET /ping)

A handmade { "action": "subscribe" } or { "tenant", "channel", "payload" } JSON object will not work.

Handshake:

  • Authorization: Bearer AT_... (non-browser)
  • Sec-WebSocket-Protocol: llps.v1, at.AT_... (browser; the server echoes only llps.v1)

See WebSocket API.

WebTransport

Same FastPubSub frames on a browser-first HTTP/3 session. Optional unidirectional subscribe lines exist (:U: / :D:). Unreliable datagrams are not the current transport. Node.js WebTransport is not supported unless a WebTransport global exists. See WebTransport.

REST

JSON over HTTPS on the selected edge api_base. Token admin routes need Authorization: Bearer <master_token>. GET /ping has no auth. See REST API.

Tokens

  • Master: MT_... (backend only)
  • Access: AT_{token_id}_{secret} (clients)

Created with POST /v1/get-token. Maximum TTL is 24 hours. See Tokens.

Errors

WebSocket errors are usually ERR: text lines or a close. REST uses HTTP status codes. See Error codes.

Tenant, channel, and payload size rules: Limits and allowed characters.