Voice को अपग्रेड किया जा रहा है

JSON में प्रोग्रामेबल voice। Calls, IVR, recording, TTS।

डेवलपर्स के लिए Voice — 140+ देशों में voice कवरेज, 1,500+ phone-number prefixes, masked calls, virtual numbers। Email और SMS जैसा ही API surface — calls बस एक और resource है।

place-call.ts
201 · 0.4s
import { BirdClient } from "@messagebird/sdk";

const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });

const { data, error } = await bird.voice.calls.create({
  to:   "+15005550010",
  from: "+14155550199",
  flow: [
    { say:    "Your verification code is..." },
    { say:    "4. 2. 9. 1. 7." },
    { gather: { digits: 1, timeout: 5 } },
    { record: { transcribe: true } },
  ],
}).safe();

if (error) throw error;
console.log(data.id);
// → "call_7tQ04Lp2n..."

install से पहली call तक 5 मिनट

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

हर बड़े runtime के लिए SDKs। पहली call एक अधिकृत test number (+15005550010) पर जाती है, ताकि आप असली number प्रोविज़न करने से पहले ही एक CI check शिप कर सकें।

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.voice.calls.create({
  to:   "+15005550010",
  from: "+14155550199",
  flow: [{ say: "Hello from Node." }],
}).safe();

voice के दस हिस्से जिन्हें आप खुद नहीं लिखना चाहेंगे।

Carrier routing, call control और observability primitives — नामित और audit-able।

  1. 01

    Outbound और inbound calls

    REST या SIP पर calls करें और रिसीव करें — वही auth model, वही idempotency contract।

  2. 02

    JSON में declarative call flows

    say, play, gather, record, transfer और dial को एक flat JSON array के रूप में कंपोज़ करें।

  3. 03

    transcription के साथ recording

    किसी भी leg पर वैकल्पिक recording; transcripts 40+ भाषाओं में अपने-आप जनरेट होते हैं।

  4. 04

    Streaming TTS, sub-250ms

    HTTP chunked transfer या WebSocket पर first-byte audio — प्रति character बिलिंग।

  5. 05

    verifications के ज़रिए Voice OTP

    SMS OTP जैसा ही bird.verifications resource; बस channel field बदलें।

  6. 06

    100+ देशों में virtual numbers

    dashboard या numbers API से सेकंडों में long codes प्रोविज़न करें।

  7. 07

    Masked calls

    caller और callee के numbers एक-दूसरे के सामने कभी उजागर नहीं होते — routing से प्राइवेसी।

  8. 08

    प्रति call SmartRouting

    हर leg के लिए रियल-टाइम में सबसे कम लागत वाला carrier चुना जाता है, और विफलता पर route फिर से चुना जाता है।

  9. 09

    प्रति call webhook events

    call.ringing, call.answered, call.completed और इनके जैसे — HMAC-signed, replay-protected।

  10. 10

    WebRTC client SDK

    एक ही npm package से browser-to-PSTN bridges; किसी भी आधुनिक runtime में काम करता है।

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

Voice वह channel है जिसे हर कोई एक afterthought की तरह मानता है। हमने नहीं माना।

Voice मुश्किल है — sub-second latency, असली carrier routing, recording compliance — और इसीलिए ज़्यादातर vendors इसे अपना अलग auth, अपना अलग SDK, अपना अलग webhook contract देते हैं। हमने इसे हर दूसरे Bird endpoint जैसा बनाने में समय लगाया: वही auth, वही idempotency, वही error envelope। Call control बस JSON है।

place-call.ts
201 · 0.4s
import { BirdClient } from "@messagebird/sdk";

const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });

const { data, error } = await bird.voice.calls.create({
  to:   "+15005550010",
  from: "+14155550199",
  flow: [
    { say:    "Your verification code is..." },
    { say:    "4. 2. 9. 1. 7." },
    { gather: { digits: 1, timeout: 5 } },
    { record: { transcribe: true } },
  ],
}).safe();

if (error) throw error;
console.log(data.id);
// → "call_7tQ04Lp2n..."

हर state change एक webhook है।

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

POST /webhooks/bird
signed
{
  "type": "call.completed",
  "id":   "evt_8qC42v...",
  "created_at": "2026-05-19T15:42:01.221Z",
  "data": {
    "call_id":    "call_7tQ04Lp2n",
    "from":       "+14155550199",
    "to":         "+15005550010",
    "direction":  "outbound",
    "status":     "completed",
    "duration_s": 42,
    "answered_at": "2026-05-19T15:41:18.402Z",
    "ended_at":    "2026-05-19T15:42:00.117Z",
    "price":       { "amount": 0.014, "currency": "USD" }
  }
}

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

  • call.queuedAPI द्वारा स्वीकृत और dial-out के लिए कतारबद्ध।
  • call.ringingरिसीव करने वाली line बज रही है — pre-answer state।
  • call.answeredcallee ने उठा लिया; इसी event पर बिलिंग शुरू होती है।
  • call.completedcall सामान्य रूप से समाप्त हुई — payload में duration और price।
  • call.failedस्थायी विफलता (busy, no-answer, carrier reject) एक typed reason के साथ।
  • call.recording.readyRecording एन्कोड हो चुकी है और payload में दिए signed URL पर उपलब्ध है।
  • call.transcript.readyTranscription पूरा हुआ; payload में language और segments शामिल हैं।

Voice OTP वही resource है जो SMS OTP है।

एक custom call करें या verification को runtime को सौंप दें। वही auth, वही idempotency, वही error envelope — बदलती है तो सिर्फ़ channel field।

Custom call।

voice.calls.create
await bird.voice.calls.create({
  to:   "+15005550010",
  flow: [
    { say: `Your code is ${code}.` },
  ],
});

किसी भी flow को कंपोज़ करें — say, gather, transfer — उन मामलों के लिए जहां आप script अपने code में चाहते हैं।

Verifications।

verifications.start
await bird.verifications.start({
  to:      "+15005550010",
  channel: "voice",
});

एक लाइन। Bird route चुनता है, fraud check चलाता है, audio prompt भेजता है। हर channel पर वही code।

प्रति मिनट, देश पर निर्भर।

Streaming TTS की बिलिंग प्रति character होती है। सामान्य थ्रेशोल्ड पर volume discounts अपने-आप लागू होते हैं। कोई seat fee नहीं, कोई tier features सालाना कमिटमेंट के पीछे लॉक नहीं।

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

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

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

Cursor