SMS is being upgraded

专为需要快速交付的开发者打造的 SMS API

150+ countries, 240 direct-to-carrier connections, one auth model. About 40% of the world's commercial SMS volume transits the Bird network — we've been at this a decade. 95% of messages delivered in under 2.5 seconds.

send-otp.ts
200 · 0.4s
import { BirdClient } from "@messagebird/sdk";

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

const code = generateOtp();

const { data, error } = await bird.sms.send({
  from: "Bird",
  to:   "+15005550006",
  text: `Your Bird verification code is ${code}. Reply STOP to opt out.`,
}).safe();

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

从 npm install 到首次发送仅需 5 分钟

用您熟悉的编程语言发送 SMS。

支持所有主流运行时的 SDK。首次发送将发往指定测试接收号码(+15005550006),因此您可以在分配号码之前先完成 CI 检查。

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.sms.send({
  from: "Bird",
  to:   "+15005550006",
  text: "Hello from Node.",
}).safe();

Ten things we file, configure, and route so you don't.

Routing, compliance, and inbound primitives, named and audit-able.

  1. 01

    覆盖 150 多个国家

    一个统一 API,一个账单关系——无需逐区域签订合同。

  2. 02

    240 条运营商直连线路

    我们与移动运营商之间没有中间聚合商抽取利润或丢失回执。

  3. 03

    运营商级路由

    当运营商路径质量下降时实时重新选路;故障切换在您察觉之前已完成。

  4. 04

    双向 SMS 入站

    入站消息以 HMAC 签名的 webhook 形式送达到您已分配的号码上。

  5. 05

    各种类型的号码

    长号码、短号码、免费电话号码和字母数字发送者 ID——通过一个端点统一分配。

  6. 06

    A2P 10DLC 控制台内注册

    品牌和活动注册在控制台中完成;状态可通过 API 查询。

  7. 07

    发送前 MNP 查询

    我们在每次发送时解析接收方的当前运营商,确保路由始终正确。

  8. 08

    STOP / HELP 合规

    自动按接收方识别退订关键词;退订列表可通过 API 查询。

  9. 09

    以 webhook 形式接收送达回执

    每次状态变更都会触发一个签名事件——从 sms.queued 到 sms.delivered 或 sms.failed。

  10. 10

    分段与 Unicode 安全

    SDK 在发送前计算分段数,并在编码切换可能导致消息拆分时发出警告。

我们为何构建 SMS

SMS 是最复杂的通信渠道。我们构建了让它变得简单可控的 API。

Every country has different rules, every carrier has different routes, every region has different sender-ID conventions. We've been running SMS for ten years, so that knowledge lives behind one endpoint, one auth model, one webhook contract. Whatever changes upstream, the call you wrote against bird.sms.send doesn't.

send-otp.ts
200 · 0.4s
import { BirdClient } from "@messagebird/sdk";

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

const code = generateOtp();

const { data, error } = await bird.sms.send({
  from: "Bird",
  to:   "+15005550006",
  text: `Your Bird verification code is ${code}. Reply STOP to opt out.`,
}).safe();

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

每次状态变更都是一个 webhook。

HMAC 签名的载荷,防重放,幂等。所有 Bird 渠道使用相同的信封格式——学会一个,就学会了全部。

POST /webhooks/bird
signed
{
  "type": "sms.delivered",
  "id":   "evt_7jR42x...",
  "created_at": "2026-05-19T15:42:01.221Z",
  "data": {
    "sms_id":     "sms_4kT01Lq2m",
    "from":       "Bird",
    "to":         "+15005550006",
    "mcc_mnc":    "310-260",
    "country":    "US",
    "segments":   1,
    "latency_ms": 1284
  }
}

重试策略:5 秒、30 秒、5 分钟、30 分钟、2 小时、6 小时、12 小时。最终尝试失败后进入死信队列;每个死信事件均可通过控制台或 API 重新发送。

  • sms.queued已被 API 接受并排队等待运营商交接。
  • sms.sent已提交至目标运营商的 SMSC。
  • sms.delivered已收到运营商的送达回执(DLR)。
  • sms.failed永久失败——运营商拒绝、无效号码或命中退订列表。
  • sms.received在您已分配的号码上收到入站消息。
  • sms.opted_out接收方发送了 STOP 关键词;后续发往该号码的消息将被抑制。

集成了 SMS,就等于集成了 WhatsApp。

相同的认证模型、相同的幂等契约、相同的错误信封、相同的 webhook 结构。区别在于各自的功能——而不是调用方式。

SMS。

sms
await bird.sms.send({
  from: "Bird",
  to:   "+15005550006",
  text: `Your code is ${code}.`,
});

一个动词。纯文本。数字格式的收发号码。每位开发者都已形成肌肉记忆的格式。

WhatsApp。

whatsapp
await bird.whatsapp.send({
  from: "+15551234567",
  to:   "+15005550006",
  template: { name: "otp", variables: { code } },
});

同一个动词。不同的载荷——模板化、用户已授权、运行在全球 20 亿人每天打开的渠道上。

因国家而异。每条分段从不到一美分到几美分不等。

按用量计费。SMS 费率取决于目的地国家和路由——完整价格表在定价页面。批量折扣在账户级别自动生效。没有席位费,没有功能被锁定在年度承诺之后。

从一个渠道开始。
准备好后,再添加其他渠道。

测试 API 密钥即刻可用。添加支付方式并验证发送者身份后,即可解锁生产环境。

Using Claude Code, Cursor, or Codex? Copy a setup prompt and your agent installs the Bird CLI and skills for you. Pick yours: