Skip to main content
Realtime channels let a deployed server publish JSON events and mint short-lived browser capabilities without exposing an organization key or runtime token. Channels are isolated by project and environment and are globally routed.

Declare a channel

Review the change before applying it:
Retention is off when retentionSeconds is 0 and is bounded to 24 hours when enabled. Presence is ephemeral. A channel can allow 1–10,000 simultaneous connections and 1–2,500 published messages per second.

Use it from a deployed server

Return only the short-lived capability to the browser. The capability fixes the channel, subject, permissions, expiry, and replay limit; it cannot escape the deployment’s project or environment. Treat it as a secret and never put the injected runtime token in browser code.

Delivery and limits

  • Live delivery is at most once. A disconnected or slow subscriber can miss an event.
  • Retained replay is ordered by channel sequence, but is not a durable job queue. Use queues when every job must eventually run.
  • One event is limited to 65,536 encoded bytes. Event names are limited to 128 characters.
  • Capabilities last 30–3,600 seconds and can request at most 100 replay events.
  • Pausing rejects new publication and capabilities. Deleting a channel permanently closes connections and removes presence and retained events.
  • Global routing does not promise a storage jurisdiction. Do not use retained events for data that requires a specific residency guarantee.

Access and billing

Members can inspect channels, statistics, and publish through the operator API. Admins create, update, and pause channels. Only owners can delete them. Creation, updates, publication, and runtime capabilities require active organization billing. Usage is metered as published-plus-delivered messages, connection minutes, and retained payload. The current amounts and included quantities are returned by billing.get; see budgets and usage. See the complete Realtime API.