Stream live events to connected browsers and mobile apps.
Push live order updates, AI agent token streams, collaborative room state, and in-app notifications over managed pub/sub channels without operating WebSocket infrastructure. Channels spin up on demand when a client subscribes and close when the last connection leaves, with public, private, presence, encrypted, and cached modes built into the channel name.
channels.ts
4 subscribed4 subscribedconst bird = new BirdRealtime({ appKey: APP_KEY, region: "us1" }); // Public: anyone holding the app key can subscribe.const scores = bird.subscribe("match-42"); // Private: your backend signs every subscription.const order = bird.subscribe("private-order-ord_123"); // Presence: private, plus an identity the room can see.const room = bird.subscribe("presence-room-42"); // Cache: the latest event replays to whoever joins next.const build = bird.subscribe("cache-build-8821"); build.bind("bird:cache_miss", () => showSkeleton());
Connection 26896.319537
channels.ts
4 subscribed4 subscribedconst bird = new BirdRealtime({ appKey: APP_KEY, region: "us1" }); // Public: anyone holding the app key can subscribe.const scores = bird.subscribe("match-42"); // Private: your backend signs every subscription.const order = bird.subscribe("private-order-ord_123"); // Presence: private, plus an identity the room can see.const room = bird.subscribe("presence-room-42"); // Cache: the latest event replays to whoever joins next.const build = bird.subscribe("cache-build-8821"); build.bind("bird:cache_miss", () => showSkeleton());
Connection 26896.319537
channels.ts
4 subscribed4 subscribedconst bird = new BirdRealtime({ appKey: APP_KEY, region: "us1" }); // Public: anyone holding the app key can subscribe.const scores = bird.subscribe("match-42"); // Private: your backend signs every subscription.const order = bird.subscribe("private-order-ord_123"); // Presence: private, plus an identity the room can see.const room = bird.subscribe("presence-room-42"); // Cache: the latest event replays to whoever joins next.const build = bird.subscribe("cache-build-8821"); build.bind("bird:cache_miss", () => showSkeleton());
Connection 26896.319537
Scope access and room behavior with the channel prefix.
Spin up rooms on demand without provisioning a channel registry.
On the Bird Realtime API, your application routes live traffic by subscribing to a case-sensitive channel name up to 164 characters long rather than pre-creating rooms in a database. The name prefix sets the security and state boundary: an unprefixed name is open to any visitor, private- requires your backend to authorize the subscriber, presence- adds a verified member roster, and private-encrypted- encrypts event payloads end to end. Because public channel names can be joined with your public app key, keep customer and tenant identifiers on authorized prefixes.
Match the channel mode to what you are streaming.
Use the same WebSocket connection and backend publish call across public broadcasts, authenticated customer feeds, and collaborative rooms.
- 01
Public channels.
Broadcast live sports scores, transit arrivals, inventory tickers, or system status updates to any visitor without hitting an authorization endpoint. Because anyone with your public app key can subscribe, use general topic names like scores-live rather than embedding customer IDs in public channel names.
- 02
Private channels.
Stream personal order trackers, AI agent token streams, billing alerts, and workspace notifications over private- channels. When a browser or mobile app subscribes, your backend checks the user's session and signs the subscription with your app secret so unauthorized connections cannot listen in.
- 03
Presence channels.
Build collaborative document rosters, live viewer bars, and support queue availability on presence- channels. Your server authorizes each subscriber and attaches a verified member profile, so connected clients receive the active room roster and real-time join and leave updates.
- 04
Encrypted channels.
Protect sensitive account updates, financial notifications, or confidential workspace data with private-encrypted- channels. Your server seals each payload using a 32-byte master key you hold, delivering ciphertext through the Realtime edge while keeping channel and event names visible for routing.
- 05
Cache channels.
Give late joiners and reconnecting mobile clients the latest state right on subscribe by adding the cache- prefix. Realtime replays the most recent published event up to a 30-minute TTL, and fires a cache-miss webhook when the cache is empty so your server can repopulate a full state snapshot.
Fan out backend events across up to 100 channels in one call.
Publish updates from your backend or background workers with a standard HTTP request and let Bird handle WebSocket fan-out to connected browsers and devices. A single call can broadcast an event to up to 100 channels (such as a live match feed and its cached twin) or batch up to 10 distinct events for different rooms. You can skip the acting tab's connection when your UI has already applied an optimistic update, return live connection or member counts in the publish response, and attach an idempotency key so network retries do not deliver duplicate events.
// One event, up to 100 channels, one request.
const result = await bird.realtime.publish(APP_ID, {
event: "score-updated",
channels: ["match-42", "cache-match-42"],
data: { home: 2, away: 1 },
// The tab that scored already rendered it locally.
exclude_connection_id: "26896.319537",
include: ["connection_count"],
});
for (const channel of result.data ?? []) {
console.log(channel.name, channel.connection_count);
}
Stream typing indicators and live cursors between peers.
Ephemeral UI signals like typing indicators, live pointer coordinates, and active selection highlights do not need a round trip through your backend. When you enable client events on your app, authorized subscribers in a private or presence room can broadcast client-prefixed events directly to other participants in the room at up to 10 messages per second per connection. Requiring an authenticated channel ensures anonymous visitors cannot broadcast with your public app key, while keeping high-frequency peer signals off your application servers.
Pair low-latency event fan-out with durable application state.
Publishing an event succeeds as soon as the Realtime edge accepts it for asynchronous fan-out to currently connected subscribers. Because live channels push updates in flight rather than storing a message queue for offline devices, keep durable records in your database and use published events or cache channels to sync connected screens. Predictable limits apply across plans: up to 100 channels per publish, 10 events per batch, 10 KB per event payload, and 164-character channel names.
Go deeper in the docs.
Read the Realtime overview for how channels, members, and connections fit together. Follow the guides on publishing events for multi-channel fan-out and optimistic UI exclusion, cache channels for late-joiner state replay and cache-miss recovery, and querying channel state for checking live room occupancy from your backend.
Keep building
with Realtime.
Combine pub/sub channels with live online rosters, server-signed access controls, and backend lifecycle webhooks.
Presence
Display live online rosters, deduplicate open tabs by user identity, and message individual members directly.
→Security
Authorize private room subscriptions on your server, authenticate connections, and encrypt sensitive payloads end to end.
→Webhooks
Trigger backend workflows when a channel becomes occupied, empties out, changes member count, or misses its cache.
→Scale without
losing control.
Organize teams in workspaces, control API access, and trace changes through audit logs.
Organization
Harbor
Access stays in its workspace.
Production/API keys
Harbor backend
ActiveAlex Lee
Admin
Today · UTC
Audit log
Organization
Harbor
Access stays in its workspace.
Production/API keys
Harbor backend
ActiveAlex Lee
Admin
Today · UTC
Audit log
Organization
Harbor
Access stays in its workspace.
Production/API keys
Harbor backend
ActiveAlex Lee
Admin
Today · UTC
Audit log