Bird 产品
您的渠道。 您的客户。 一个平台。
跨邮件、消息、语音和连接进行构建。探索开发者 API 和原生客户对话,附带每个产品所需的设置、访问和集成指南。
全部产品。 为您的客户找到合适的体验。
01POST /v1/emails
Email. 为同时处理多种消息的开发者打造的邮件 API。
welcome.tsx
await bird.email.send({
from: "hello@yourdomain.com",
to: ["alex@example.com"],
subject: "Welcome to Bird",
html: "<p>You're in. Let's ship.</p>",
});02POST /v1/email/mailboxes
Mailbox. Mailbox API,为能自主回复邮件的智能代理而生。
claim-mailbox.sh
curl -X POST https://us1.platform.bird.com/v1/email/mailboxes \
-H "Authorization: Bearer $BIRD_API_KEY" \
-d '{"domain": "inbox.ai", "receive_policy": "open"}'
{
"id": "mbx_01krdgeqcxet5s7t44vh8rt9mg",
"address": "k7mq3vx2npr5wcj4tzh6@inbox.ai",
"state": "active"
}
03POST /v1/sms/messages
SMS. 为真正需要快速交付的开发者打造的 SMS API。
notify.ts
await bird.sms.send({
to: "+15005550006",
text: "Your code is 847291. Expires in 10 min.",
category: "authentication",
});04GET /v1/voice/calls
Voice. SIP 中继,每次通话均有记录和事件。
dial.ts
const leg = await bird.voice.legs.get("vcl_01k0p3v9wera3v6q6xw3e9y2mh");
leg.status; // "answered" | "no_answer" | "ringing" | …
05POST /v1/whatsapp/messages
WhatsApp. 通过 WhatsApp API 与全球客户互动。
message.ts
await bird.whatsapp.send({
from: "+15557654321",
to: "+15005550006",
text: { body: "Order confirmed! 🎉" },
});06POST /v1/verify/verifications
Verify. 为需要验证码必达的开发者打造的 OTP API。
verify.ts
await bird.verify.verifications.create({
to: { phone_number: "+15005550006" },
});
// check by target — no id to store
await bird.verify.verifications.check({
to: { phone_number: "+15005550006" }, code: userCode,
});07POST /v1/lookup/phone-number
Lookup. 在发送之前验证手机号码或电子邮件地址。
lookup.ts
await bird.lookup.phoneNumber({
phone_number: "+31612345678",
});08POST /v1/rcs
RCS. RCS for Business API,SMS 更好看的同胞。
rich.ts
await bird.rcs.send({
to: "+15005550006",
text: "Your order shipped! 📦",
suggestions: [
{ type: "openUrl", text: "Track it", url },
],
});09POST /v1/push
Push. 适用于 iOS、Android 和 Web 的推送通知。
push.ts
await bird.push.send({
to: { deviceToken },
notification: {
title: "Order shipped!",
body: "Your package is on its way.",
},
});10POST /v1/realtime/publish
Realtime. 基于 WebSocket 的托管发布/订阅服务。订阅、发布、弹性扩展。
realtime.ts
await bird.realtime.publish("rap_01krdgeqcxet5s7t44vh8rt9mg", {
channels: ["orders"],
event: "order.shipped",
data: { orderId, status: "shipped" },
});
11移动连接
eSIM. 以您的品牌提供移动套餐、旅行流量和员工连接服务。
12Apple Messages for Business
Apple Messages. 在 Messages 应用中提供原生选项、预约和服务。
Bird 的公共 API 使用常见的身份验证、错误处理和分页机制。请参阅产品指南了解支持的操作、权限和集成要求。
/ Auth
/ Idempotency
/ Errors
/ Webhooks
/ Pagination
/ Typed IDs
付诸实践。
继续查阅此主题的文档、指南和示例。资源为英文。