JSON में प्रोग्रामेबल voice। Calls, IVR, recording, TTS।
Voice for developers: 140+ countries with voice coverage, 1,500+ phone-number prefixes, masked calls, virtual numbers. Same API surface as Email and SMS: calls are just another resource.
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 शिप कर सकें।
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, and observability primitives, named and audit-able.
- 01
Outbound और inbound calls
Place and receive calls over REST or SIP: same auth model, same idempotency contract.
- 02
JSON में declarative call flows
say, play, gather, record, transfer और dial को एक flat JSON array के रूप में कंपोज़ करें।
- 03
transcription के साथ recording
किसी भी leg पर वैकल्पिक recording; transcripts 40+ भाषाओं में अपने-आप जनरेट होते हैं।
- 04
Streaming TTS, sub-250ms
First-byte audio over HTTP chunked transfer or WebSocket, billed by character.
- 05
verifications के ज़रिए Voice OTP
SMS OTP जैसा ही bird.verifications resource; बस channel field बदलें।
- 06
100+ देशों में virtual numbers
dashboard या numbers API से सेकंडों में long codes प्रोविज़न करें।
- 07
Masked calls
Caller and callee numbers are never exposed to each other: privacy by routing.
- 08
प्रति call SmartRouting
हर leg के लिए रियल-टाइम में सबसे कम लागत वाला carrier चुना जाता है, और विफलता पर route फिर से चुना जाता है।
- 09
प्रति call webhook events
call.ringing, call.answered, call.completed and friends: HMAC-signed, replay-protected.
- 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 है।
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. The same envelope on every Bird channel: learn one, you've learned them all.
{
"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.ringingThe receiving line is ringing: pre-answer state.call.answeredcallee ने उठा लिया; इसी event पर बिलिंग शुरू होती है।call.completedThe call ended normally: duration and price in the payload.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 है।
Place a custom call or hand the verification off to the runtime. Same auth, same idempotency, same error envelope: the channel field is the only thing that moves.
Custom call।
await bird.voice.calls.create({
to: "+15005550010",
flow: [
{ say: `Your code is ${code}.` },
],
});
किसी भी flow को कंपोज़ करें — say, gather, transfer — उन मामलों के लिए जहां आप script अपने code में चाहते हैं।
Verifications।
await bird.verifications.start({
to: "+15005550010",
channel: "voice",
});
एक लाइन। Bird route चुनता है, fraud check चलाता है, audio prompt भेजता है। हर channel पर वही code।