Channel orchestration

Bird decides the defaults. You tune a single call.

इसमें सेट अप करें:
Cursor

Channel availability, sender rules, and regulations differ by country, and getting them right is years of work. Bird ships that as a per-country base: which channels land where, which senders are allowed, and sane code defaults, drawn from running email and SMS at scale. A create call already resolves to the right plan for any country, and its options field can reorder or narrow the channels or set the code length for that one verification.

verify.ts
200 · pending
import { BirdClient } from "@messagebird/sdk";

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

// Send the code, then check it by recipient.
await bird.verify.verifications.create({
  to: { phone_number: "+15551234567" },
}).safe();

const { data, error } = await bird.verify.verifications.check({
  to:   { phone_number: "+15551234567" },
  code: userInput,
}).safe();
if (error) throw error;

Bird's defaults travel with every call.

Every verification on the Bird Verify API resolves against a per-country base Bird maintains from years of running email and SMS, so a verification already routes sensibly in every country before you write a line of code. A per-request option can still tune a single call: reorder or narrow the channels, or set the code length. You're never starting from a blank slate.

Two layers decide the plan.

The narrower one wins; whatever a request doesn't set falls through to Bird's per-country base.

  1. 01

    प्रति-request options।

    Pass channels or code_length on the create call to reorder or narrow the channels, or set the code length, for that one verification. Omit either and the country's default applies.

  2. 02

    Bird का प्रति-देश base।

    Bird's own per-country defaults, drawn from running email and SMS at scale: which channels are available, which senders are allowed, and sane code and TTL defaults. Whatever a request doesn't override resolves from this, so a verification always lands on a sensible plan.

एक verification किसमें resolve होता है।

A Brazilian number resolves against Bird's per-country base for Brazil, narrowed by any per-request options on the call. WhatsApp and SMS are both available there, so the verification reports that ordered plan, with its typed vrf_ id.

resolved.ts
200
const { data, error } = await bird.verify.verifications.create({
  to: { phone_number: "+5511998765432" }, // Brazil
}).safe();
if (error) throw error;

// Resolved from the per-country base, capped by availability and the kill-switch:
// {
//   id:           "vrf_01k2m9q8e7fh3v0b7m4d2a9xzt",
//   status:       "pending",
//   channels:     [{ channel: "whatsapp" }, { channel: "sms" }],
//   last_channel: "whatsapp"
// }

Two ceilings sit above the defaults.

The two layers above decide defaults. Two gates decide what's allowed on top of that, and each one only narrows the resolved plan:

Per-country availability. A country's resolved plan only ever includes channels Bird actually offers there. A request's options can reorder or narrow that plan; they can't add a channel the country doesn't support, since availability is an intersection.

Global kill-switch. When a provider has an incident, Bird can pull a channel everywhere at once. The resolved plan simply falls back to the next channel, then restores automatically when the switch clears.

The plan is on every response.

हर verification के लिए resolved, response पर लौटाया गया।

  1. 01

    resolved plan response पर होता है।

    Every verification reports the ordered channels it resolved to, so the resolved plan is never a mystery.

  2. 02

    Automatic failover walks the plan for you.

    A channel that fails advances the verification to the next one in the plan, and a per-attempt delivery timer advances it when no delivery status arrives at all. Every code in the session stays valid, so the recipient can use whichever message reaches them. You can also advance a verification on demand with a next-channel call.

Per-country defaults you don't have to build yourself.

Per-country defaults are one capability of Bird Verify: the channels, the code, and the limits ship with it, on the same create and check calls.

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

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

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

Cursor