RCS 商业消息——SMS 更出色的兄弟。
Rich cards, suggested replies, branded sender, read receipts. Fall back to SMS in one attribute. Same auth, same idempotency, same webhooks as every other Bird channel, because the same engineering team built them all.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.rcs.send({
to: "+15005550006",
card: {
title: "Your order has shipped",
subtitle: "Arriving Friday, May 22",
image: "https://cdn.example.com/orders/2891.jpg",
buttons: [
{ type: "url", label: "Track package", url: "https://example.com/track/2891" },
{ type: "reply", label: "Reschedule", postback: "reschedule_2891" },
],
},
fallback: "sms",
}).safe();
if (error) throw error;
console.log(data.id);
// → "rcs_4mP82wQ9..."
从 npm install 到首次发送仅需 5 分钟
用您已经在使用的语言发送富媒体消息。
SDKs in every major runtime. The first send goes to the sanctioned test number (+15005550006) and falls back to SMS automatically, so the CI check doesn't require an RCS-capable handset.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.rcs.send({
to: "+15005550006",
card: { title: "Hello", subtitle: "From Bird RCS" },
fallback: "sms",
}).safe();从"文本"到真正应用界面之间的十个基础组件。
RCS 是比 SMS 更丰富的协议。我们将其丰富能力以基础组件的形式呈现,而非设计画布。
- 01
富媒体卡片
每张卡片支持标题、副标题、主图以及最多 4 个操作按钮。单条消息可轮播最多 10 张卡片。
- 02
建议回复
点击即回复的快捷按钮,将已知字符串回传至您的 webhook。无需在您端进行自然语言理解猜测。
- 03
品牌化发送者
在手机聊天界面顶部展示经过验证的企业身份,包括 logo、品牌色和简短描述。
- 04
已读回执与输入状态
Delivery, read, and "is typing" states as webhooks, the same envelope shape as every other channel.
- 05
通过一个属性回退到 SMS
传入 fallback: "sms"。如果终端设备不支持 RCS,我们将透明地发送纯文本版本。
- 06
交互式回调
按钮点击会以 rcs.replied 事件返回,携带您设置的回调字符串,可直接接入状态机。
- 07
媒体附件
支持图片、最大 100MB 的视频、音频、PDF 和 vCard。我们托管资源并提供带有效期的签名 URL。
- 08
双向对话
用户的入站回复以 HMAC 签名的 Webhook 形式送达,数据结构与入站 SMS 和 WhatsApp 消息一致。
- 09
运营商与设备能力检测
发送前我们会检测 RCS 能力。如果设备离线或不支持 RCS,将自动回退。
- 10
统一认证,统一错误格式
一个 API 密钥通用于 RCS、SMS、Email、WhatsApp、Voice。一套错误类型注册表覆盖所有渠道。
我们为何构建 RCS
因为在 2026 年,最低成本的渠道和最丰富的渠道理应合二为一。
支持 RCS 的终端将收到富媒体卡片;其他终端则收到我们从同一消息体自动生成的 SMS 版本。我们在 240 条运营商直连通道上运营 SMS 已有十年;RCS 使用的是同一路由层,只是承载了更丰富的消息类型并增加了回退标志。关于覆盖范围,我们坦诚相告:目前 RCS 已落地美国运营商(T-Mobile、Verizon、AT&T)及巴西;欧盟和亚太地区将在 2026 年陆续扩展。在覆盖范围之外,回退标志会自动完成工作。
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.rcs.send({
to: "+15005550006",
card: {
title: "Your order has shipped",
subtitle: "Arriving Friday, May 22",
image: "https://cdn.example.com/orders/2891.jpg",
buttons: [
{ type: "url", label: "Track package", url: "https://example.com/track/2891" },
{ type: "reply", label: "Reschedule", postback: "reschedule_2891" },
],
},
fallback: "sms",
}).safe();
if (error) throw error;
console.log(data.id);
// → "rcs_4mP82wQ9..."
每次状态变更都是一个 Webhook。
HMAC-signed payloads, replay-protected, idempotent. The same envelope on every Bird channel: learn one, you've learned them all.
{
"type": "rcs.delivered",
"id": "evt_7nT91x...",
"created_at": "2026-05-19T15:42:01.221Z",
"data": {
"rcs_id": "rcs_4mP82wQ9",
"to": "+15005550006",
"carrier": "T-Mobile USA",
"rich": true,
"latency_ms": 612
}
}
重试计划:5s、30s、5m、30m、2h、6h、12h。最终尝试失败后进入死信队列;所有死信事件均可通过仪表板或 API 重放。
rcs.queued已被 API 接受并加入发送队列。rcs.sent已移交至运营商 RBM 网关。rcs.delivered终端已确认收到富媒体消息。rcs.read接收方已阅读消息(如已启用已读回执)。rcs.replied用户点击了建议回复按钮或发送了自由文本回复。rcs.fellback终端设备不支持 RCS;已改用 SMS 发送。rcs.failed发送前永久失败(收件人无效、运营商拒绝)。
如果您已集成 SMS,就等于已集成 RCS。
Same auth, same idempotency contract, same error envelope, same webhook shape. The difference is the payload, not how you call it.
RCS。
await bird.rcs.send({
to: "+15005550006",
card: { title: "Your code", subtitle: `Code: ${code}` },
fallback: "sms",
});
在支持 RCS 的设备上呈现为真实的富媒体卡片。超出覆盖范围时,回退标志会将相同载荷通过 SMS 路由发送。
SMS。
await bird.sms.send({
from: "Bird",
to: "+15005550006",
text: `Your code is ${code}.`,
category: "authentication",
});
当您需要明确指定时,可直接调用 SMS 路径。相同的认证、相同的 Webhook、相同的幂等机制。