# Design it in Rocket. Wire it to Bird.

Import the Bird API into Rocket as a Postman collection. Attach a request to a screen, and Rocket writes the call for email, SMS, WhatsApp, voice, or verification.

[Get Started](/dashboard/signup)

[Contact Sales](/demo)

## 从提示词到 送达。

你的智能体可以设置通道、管理客户并确认送达。 通过 MCP 和 CLI 实现完整的读写访问。

**MCP**: `https://mcp.bird.com`

```json
{
  "name": "voice_legs_list"
}
```

Examples: [MCP](/zh-sg/ai/rocket.mcp.md) · [CLI](/zh-sg/ai/rocket.cli.md) · [TypeScript](/zh-sg/ai/rocket.ts.md) · [Python](/zh-sg/ai/rocket.py.md) · [Go](/zh-sg/ai/rocket.go.md) · [PHP](/zh-sg/ai/rocket.php.md) · [HTTP](/zh-sg/ai/rocket.http.md)

## 将 Bird 导入 Rocket。 然后将请求连接到界面。

Rocket 从集合中读取请求。你的 API 密钥保存在任务的环境变量中。

Rocket 的 Bird 集合 [下载集合](/postman/bird-api-rocket.postman_collection.json)

```
bird-api-rocket.postman_collection.json
```

环境变量

```
BIRD_API_KEY=bk_us1_…
BIRD_API_URL=https://us1.platform.bird.com
```

-

### 上传集合

在你的 Rocket 任务中，点击预览工具栏中的 …，选择 APIs。打开 Select an API，点击 Add APIs，选择 Upload JSON，拖入集合，然后点击 Submit。

-

### 将请求连接到界面

选择一个路由和请求（例如 Create an email message），点击 Integrate API，然后点击要触发发送的元素。Rocket 会询问何时调用 API 并自动生成代码。

-

### 设置你的 API 密钥

在 Bird 的 Developers 下创建一个 API 密钥，然后打开 API keys。在 Rocket 中，点击任务名称，打开 Settings，然后进入 Environment，在 Staging 和 Production 标签页中设置 BIRD_API_KEY 和 BIRD_API_URL。以 bk_eu1_ 开头的密钥会调用 https://eu1.platform.bird.com。

[探索 API](/docs/api)

## 由智能体构建。 为你的用户准备就绪。

你发布的应用需要自己的服务端连接来访问 Bird。

### 将密钥保留在服务端

Rocket 将 BIRD_API_KEY 保存在任务的环境变量中。不要添加 NEXT_PUBLIC_ 前缀，这样密钥就只存在于服务端代码中，不会暴露到浏览器。

[探索 API](/docs/api)

### 使用你控制的发送者

验证你的邮件域名，或为所选渠道配置一个合规的发送者。

[准备你的首次发送](/docs)

### 展示真实结果

保存消息 ID。根据消息状态或投递事件更新你的应用。

[跟踪结果](/docs/guides/webhooks)

## 几个不错的 起点。

告诉 Rocket 要执行什么操作，并指定要调用的 Bird 请求。

发送欢迎邮件

```
When a user signs up, call Create an email message to send a welcome email. Save the returned message ID on the user.
```

发送订单更新短信

```
When an order ships, call Create an SMS message with the customer’s phone number and the tracking link. Show an error on the order page if the call fails.
```

验证手机号码

```
On the sign-up screen, call Create a verification for the phone number the user enters. On the next screen, call Create a verification passcode check with the code they type.
```

## 在你的第一个任务之前。

连接正常工作背后的细节。

为什么使用 Postman 集合？

Rocket 的 API 面板可以导入 Postman 集合、cURL 命令和 OpenAPI 文件。Bird 集合为每个请求提供了可用的示例，并按照 Rocket 环境命名其变量。

我的应用应该调用哪个主机？

你的 API 密钥所指定的主机。以 bk_us1_ 开头的密钥调用 https://us1.platform.bird.com，以 bk_eu1_ 开头的密钥调用 https://eu1.platform.bird.com。将 BIRD_API_URL 设置为对应的值。

如何获取新的 Bird 请求？

重新下载集合并将文件上传到你的任务中。Bird 每次发布时都会根据其 API 规范重新构建集合。

## 继续构建。 一切互联。

借助工具和指南，迈出项目的下一步。

- [API 参考](/docs/api) — 查阅每个请求的字段和响应。

- [Webhooks](/docs/guides/webhooks) — 将投递事件回传到你的应用。

- [其他 AI 工具](/ai) — 从其他工具使用同一个工作区。



## Related resources

- [Setting up your coding agent](/learn/basics/setting-up-your-coding-agent) (video)
- [Set up your coding agent](/docs/ai/set-up-your-agent) (docs)
- [What is an MCP server, and how does an agent use one to send messages?](/explained/platform/what-is-an-mcp-server-and-how-does-an-agent-send-messages) (answer)
- [Build with AI agents](/learn/paths/agents) (course)

[Get an implementation brief](/learn/workspace?topic=agents)
