Pub/sub terkelola melalui WebSocket. Subscribe, publish, skalakan.
Live chat, presence, in-app notifications, real-time dashboards, without running the WebSocket infrastructure yourself. Built on the same technology that ran Pusher Channels for a decade. Same auth, same idempotency, same webhook contract as every other Bird channel.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
// On your server: publish an event to a channel.
const { data, error } = await bird.realtime.publish({
channel: "orders:BRD-49217",
event: "order.shipped",
data: { status: "shipped", eta: "Thursday, May 22" },
}).safe();
// In your client: subscribe and receive it live.
const channel = bird.realtime.subscribe("orders:BRD-49217");
channel.on("order.shipped", (event) => render(event.data));
if (error) throw error;
console.log(data.id);
// → "evt_2nQ81oP3..."
5 menit dari npm install ke event pertama
Publish event pertama Anda dari bahasa yang sudah Anda gunakan.
SDK di setiap runtime utama. Publish pertama mendarat di channel uji coba resmi (bird-test:realtime) sehingga Anda bisa mengirim CI check sebelum menyediakan channel produksi.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.realtime.publish({
channel: "bird-test:realtime",
event: "ping",
data: { hello: "world" },
}).safe();Sepuluh hal antara "server Anda mem-publish" dan "klien Anda menerima event."
Primitif pub/sub terkelola, bernama dan dapat diaudit. Tidak perlu menjalankan infrastruktur WebSocket sendiri.
- 01
Subscribe ke channel bernama
Klien membuka koneksi, subscribe ke satu atau lebih channel, menerima event saat dipublish.
- 02
Publish dari mana saja
From your backend, your CLI, your CI, or an MCP-aware agent: same bird.realtime.publish call.
- 03
Presence channels
Ketahui siapa yang ada di channel, siapa yang bergabung, siapa yang keluar. Event webhook di setiap perubahan.
- 04
Private channels dengan auth
Handshake auth di sisi klien; backend Anda menandatangani permintaan subscription.
- 05
Encrypted channels
Enkripsi end-to-end untuk channel yang membawa payload sensitif.
- 06
Pemulihan status koneksi
Klien terhubung kembali dan memutar ulang event yang terlewat selama terputus, hingga jendela waktu yang dapat dikonfigurasi.
- 07
Rate limit level channel
Batas publish per channel yang dapat dikonfigurasi. Dasbor menampilkan limit dan rate saat ini.
- 08
Routing lintas wilayah
Koneksi diarahkan ke edge node terdekat secara otomatis. Latensi tetap rendah di wilayah mana pun.
- 09
Webhook pada status channel
realtime.channel.occupied, realtime.channel.vacated, realtime.member.added, realtime.member.removed. Envelope HMAC yang sama seperti setiap channel Bird lainnya.
- 10
Auth yang sama, envelope error yang sama
Satu API key untuk Realtime, SMS, Email, WhatsApp, Voice. Satu registri tipe error untuk semuanya.
Mengapa kami membangun Realtime
UX live adalah bagian yang pertama rusak saat Anda melakukan skalasi. Kami sudah menjalankannya selama satu dekade.
Bird Realtime is the WebSocket infrastructure that powered Pusher Channels, the service many of you have shipped against for years. We're folding it into the new Bird API so it shares auth, observability, and billing with everything else you do on Bird. If you're already on Pusher today, your service keeps running on the same wires; the new SDK is the developer-facing change.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
// On your server: publish an event to a channel.
const { data, error } = await bird.realtime.publish({
channel: "orders:BRD-49217",
event: "order.shipped",
data: { status: "shipped", eta: "Thursday, May 22" },
}).safe();
// In your client: subscribe and receive it live.
const channel = bird.realtime.subscribe("orders:BRD-49217");
channel.on("order.shipped", (event) => render(event.data));
if (error) throw error;
console.log(data.id);
// → "evt_2nQ81oP3..."
Setiap perubahan status adalah webhook.
HMAC-signed payloads, replay-protected, idempotent. The same envelope on every Bird channel: learn one, you've learned them all.
{
"type": "realtime.member.added",
"id": "evt_3pX1g7t...",
"created_at": "2026-05-19T15:42:01.221Z",
"data": {
"channel": "presence:room-42",
"member_id": "usr_4hQ2m",
"members": 18,
"region": "us-east"
}
}
Jadwal percobaan ulang: 5s, 30s, 5m, 30m, 2h, 6h, 12h. Dead-letter setelah percobaan terakhir; setiap event dead-letter dapat di-replay dari dashboard atau API.
realtime.channel.occupiedSubscriber pertama bergabung ke channel yang sebelumnya kosong.realtime.channel.vacatedSubscriber terakhir keluar; channel sekarang kosong.realtime.member.addedSeorang member bergabung ke presence channel.realtime.member.removedSeorang member meninggalkan presence channel.realtime.message.publishedSebuah event dipublish ke channel.
Jika Anda sudah mengintegrasikan email, Anda sudah mengintegrasikan Realtime.
Same auth, same idempotency contract, same error envelope, same webhook shape. The difference is the transport: a long-lived WebSocket connection instead of a one-shot REST send.
Realtime.
const channel = bird.realtime.subscribe("orders:BRD-49217");
channel.on("order.shipped", (event) => {
render(event.data);
});
Buka koneksi, subscribe ke channel, terima event secara real-time. Auth sama seperti pengiriman transaksional Anda.
SMS.
await bird.sms.send({
from: "Bird",
to: "+15005550006",
text: `Your order has shipped.`,
category: "transactional",
});
Format sama, idempotency sama. Untuk saat event perlu sampai ke ponsel, bukan ke klien yang terhubung.
Harga segera diumumkan.
Harga Realtime sedang dalam finalisasi. Jika Anda pelanggan Pusher Channels saat ini, layanan Anda tetap berjalan di paket yang ada. Untuk penawaran Bird Realtime SDK yang baru, hubungi kami.