Realtime को upgrade किया जा रहा है

WebSockets पर hosted pub/sub। Subscribe करें, publish करें, scale करें।

Live chat, presence, in-app notifications, real-time dashboards — और वह भी WebSocket infrastructure खुद चलाए बिना। उसी तकनीक पर बना जिसने एक दशक तक Pusher Channels को चलाया। हर दूसरे Bird channel जैसा ही auth, वही idempotency, वही webhook contract।

realtime.ts
200 · 0.2s
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..."

npm install से पहले event तक सिर्फ 5 मिनट

जिस भाषा का आप पहले से इस्तेमाल करते हैं, उसी से अपना पहला event publish करें।

हर बड़े runtime में SDKs। पहला publish एक मान्य test channel (bird-test:realtime) पर लैंड करता है, ताकि आप production channel provision करने से पहले एक CI check ship कर सकें।

1
2
3
4
5
6
7
8
9
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();

"आपका server publish करता है" और "आपके client को event मिलता है" के बीच की दस बातें।

Hosted pub/sub primitives, नामित और audit करने योग्य। खुद चलाने के लिए कोई WebSocket infrastructure नहीं।

  1. 01

    नामित channels को subscribe करें

    Clients एक connection खोलते हैं, एक या अधिक channels को subscribe करते हैं, और जैसे-जैसे events publish होते हैं वैसे-वैसे उन्हें प्राप्त करते हैं।

  2. 02

    कहीं से भी publish करें

    आपके backend से, आपके CLI से, आपके CI से, या किसी MCP-aware agent से — वही bird.realtime.publish call।

  3. 03

    Presence channels

    जानें कि किसी channel में कौन है, कौन जुड़ा, कौन निकला। हर बदलाव पर webhook events।

  4. 04

    Auth के साथ private channels

    Client पर auth handshake; आपका backend subscription request को sign करता है।

  5. 05

    Encrypted channels

    संवेदनशील payloads ले जाने वाले channels के लिए end-to-end encryption।

  6. 06

    Connection state recovery

    Clients फिर से connect होते हैं और disconnect के दौरान छूटे events को एक configurable window तक replay करते हैं।

  7. 07

    Channel-level rate limits

    प्रति-channel configurable publish caps। Dashboard limit और मौजूदा rate दोनों दिखाता है।

  8. 08

    Cross-region routing

    Connections अपने आप निकटतम edge node पर route होते हैं। किसी भी region में latencies कम बनी रहती हैं।

  9. 09

    Channel state पर webhooks

    realtime.channel.occupied, realtime.channel.vacated, realtime.member.added, realtime.member.removed। हर दूसरे Bird channel जैसा ही HMAC envelope।

  10. 10

    वही auth, वही error envelope

    Realtime, SMS, Email, WhatsApp, Voice के लिए एक API key। इन सबके लिए एक ही error type registry।

हम Realtime क्यों बनाते हैं

जब आप scale करते हैं तो सबसे पहले Live UX ही टूटता है। हम इसे एक दशक से चला रहे हैं।

Bird Realtime वही WebSocket infrastructure है जिसने Pusher Channels को चलाया — वह service जिसके साथ आप में से कई ने वर्षों तक ship किया है। हम इसे नए Bird API में समेट रहे हैं, ताकि यह auth, observability और billing को Bird पर आपके बाकी सब काम के साथ साझा करे। अगर आप आज पहले से Pusher पर हैं, तो आपकी service उन्हीं wires पर चलती रहती है; नया SDK ही developer-facing बदलाव है।

realtime.ts
200 · 0.2s
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..."

हर state change एक webhook है।

HMAC-signed payloads, replay-protected, idempotent। हर Bird channel पर वही envelope — एक सीख लो, सब सीख लिए।

POST /webhooks/bird
signed
{
  "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"
  }
}

Retry schedule: 5s, 30s, 5m, 30m, 2h, 6h, 12h। आखिरी प्रयास के बाद dead-letter; हर dead-lettered event को dashboard या API से replay किया जा सकता है।

  • realtime.channel.occupiedपहला subscriber एक पहले से खाली channel में जुड़ा।
  • realtime.channel.vacatedआखिरी subscriber निकल गया; channel अब खाली है।
  • realtime.member.addedएक member किसी presence channel में जुड़ा।
  • realtime.member.removedएक member किसी presence channel से निकला।
  • realtime.message.publishedएक channel पर एक event publish हुआ।

अगर आपने email integrate किया है, तो आपने Realtime integrate कर लिया है।

वही auth, वही idempotency contract, वही error envelope, वही webhook shape। फर्क सिर्फ transport का है — एक one-shot REST send के बजाय एक long-lived WebSocket connection।

Realtime.

realtime
const channel = bird.realtime.subscribe("orders:BRD-49217");

channel.on("order.shipped", (event) => {
  render(event.data);
});

एक connection खोलें, एक channel subscribe करें, और events जैसे ही fire हों वैसे ही पाएं। आपके transactional sends जैसा ही auth।

SMS.

sms
await bird.sms.send({
  from:     "Bird",
  to:       "+15005550006",
  text:     `Your order has shipped.`,
  category: "transactional",
});

वही envelope, वही idempotency। तब के लिए जब event को किसी connected client में नहीं, बल्कि किसी फोन पर लैंड करना हो।

Pricing जल्द ही घोषित होगी।

Realtime की pricing को अंतिम रूप दिया जा रहा है। अगर आप मौजूदा Pusher Channels customer हैं, तो आपकी service अपने मौजूदा plan पर बनी रहती है। नए Bird Realtime SDK के लिए quote चाहिए तो हमें एक संदेश भेजें।

Waitlist में शामिल हों

एक चैनल से शुरुआत करें।
तैयार होने पर बाकी जोड़ें।

एक test API key तुरंत आपकी है। जब आप payment method जोड़ते हैं और sender verify करते हैं, तब production अनलॉक हो जाता है।

Claude Code, Cursor या Codex इस्तेमाल कर रहे हैं? एक setup prompt कॉपी करें और आपका agent आपके लिए Bird CLI और skills इंस्टॉल कर देगा। अपना चुनें:

Cursor