create-phone-number
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVapi Phone Number Setup
Vapi 电话号码设置
Import phone numbers from Twilio, Vonage, or Telnyx, or use Vapi's built-in numbers to connect voice assistants to real phone calls.
Setup: Ensureis set. See theVAPI_API_KEYskill if needed.setup-api-key
从Twilio、Vonage或Telnyx导入电话号码,或使用Vapi内置号码将语音助手与真实通话连接起来。
设置: 确保已配置。如有需要,请查看VAPI_API_KEY技能。setup-api-key
Quick Start — Buy a Vapi Number
快速开始 — 购买Vapi号码
Vapi provides free phone numbers for testing with daily call limits.
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "vapi",
"assistantId": "your-assistant-id",
"name": "Main Support Line"
}'Vapi提供免费电话号码用于测试,有每日通话限制。
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "vapi",
"assistantId": "your-assistant-id",
"name": "Main Support Line"
}'Import from Twilio
从Twilio导入
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "twilio",
"number": "+11234567890",
"twilioAccountSid": "your-twilio-account-sid",
"twilioAuthToken": "your-twilio-auth-token",
"assistantId": "your-assistant-id",
"name": "Twilio Support Line"
}'bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "twilio",
"number": "+11234567890",
"twilioAccountSid": "your-twilio-account-sid",
"twilioAuthToken": "your-twilio-auth-token",
"assistantId": "your-assistant-id",
"name": "Twilio Support Line"
}'Import from Vonage
从Vonage导入
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "vonage",
"number": "+11234567890",
"credentialId": "your-vonage-credential-id",
"assistantId": "your-assistant-id",
"name": "Vonage Support Line"
}'bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "vonage",
"number": "+11234567890",
"credentialId": "your-vonage-credential-id",
"assistantId": "your-assistant-id",
"name": "Vonage Support Line"
}'Import from Telnyx
从Telnyx导入
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "telnyx",
"number": "+11234567890",
"credentialId": "your-telnyx-credential-id",
"assistantId": "your-assistant-id",
"name": "Telnyx Support Line"
}'bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "telnyx",
"number": "+11234567890",
"credentialId": "your-telnyx-credential-id",
"assistantId": "your-assistant-id",
"name": "Telnyx Support Line"
}'Assign an Assistant
关联助手
Every phone number can be linked to an assistant or squad for inbound calls:
bash
curl -X PATCH https://api.vapi.ai/phone-number/{id} \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "your-assistant-id"
}'Or assign a squad:
bash
curl -X PATCH https://api.vapi.ai/phone-number/{id} \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"squadId": "your-squad-id"
}'每个电话号码都可以关联到一个助手或团队,用于处理呼入通话:
bash
curl -X PATCH https://api.vapi.ai/phone-number/{id} \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "your-assistant-id"
}'或者关联一个团队:
bash
curl -X PATCH https://api.vapi.ai/phone-number/{id} \
-H "Authorization: Bearer $VAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"squadId": "your-squad-id"
}'Phone Number Hooks
电话号码钩子
Configure automated actions when calls come in:
json
{
"hooks": [
{
"on": "call.ringing",
"do": [
{
"type": "say",
"exact": "Please hold while we connect you."
}
]
}
]
}配置通话接入时的自动化操作:
json
{
"hooks": [
{
"on": "call.ringing",
"do": [
{
"type": "say",
"exact": "Please hold while we connect you."
}
]
}
]
}Managing Phone Numbers
管理电话号码
bash
undefinedbash
undefinedList all phone numbers
列出所有电话号码
curl https://api.vapi.ai/phone-number
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
curl https://api.vapi.ai/phone-number
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
Get a phone number
获取单个电话号码信息
curl https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
curl https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
Update a phone number
更新电话号码信息
curl -X PATCH https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Content-Type: application/json"
-d '{"name": "Updated Name"}'
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Content-Type: application/json"
-d '{"name": "Updated Name"}'
curl -X PATCH https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Content-Type: application/json"
-d '{"name": "Updated Name"}'
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Content-Type: application/json"
-d '{"name": "Updated Name"}'
Delete a phone number
删除电话号码
curl -X DELETE https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
undefinedcurl -X DELETE https://api.vapi.ai/phone-number/{id}
-H "Authorization: Bearer $VAPI_API_KEY"
-H "Authorization: Bearer $VAPI_API_KEY"
undefinedInbound Call Flow
呼入通话流程
- Caller dials your Vapi phone number
- Vapi routes the call to the assigned assistant or squad
- The assistant speaks its
firstMessage - The conversation proceeds with the configured model, voice, and tools
- 呼叫者拨打你的Vapi电话号码
- Vapi将通话路由到关联的助手或团队
- 助手说出其内容
firstMessage - 对话按照配置的模型、语音和工具进行
Outbound Call Flow
呼出通话流程
- Create a call via with
POST /callandphoneNumberIdcustomer.number - Vapi dials the customer from your phone number
- When answered, the assistant begins the conversation
- 通过接口创建通话,传入
POST /call和phoneNumberIdcustomer.number - Vapi使用你的电话号码拨打客户
- 客户接听后,助手开始对话
Free Number Limitations
免费号码限制
- Cannot make international calls
- Daily call limits apply
- For production use, import your own Twilio/Vonage/Telnyx numbers
- 无法拨打国际电话
- 有每日通话次数限制
- 生产环境请导入自己的Twilio/Vonage/Telnyx号码
References
参考资料
Additional Resources
额外资源
This skills repository includes a Vapi documentation MCP server () that gives your AI agent access to the full Vapi knowledge base. Use the tool to look up anything beyond what this skill covers — advanced configuration, troubleshooting, SDK details, and more.
vapi-docssearchDocsAuto-configured: If you cloned or installed these skills, the MCP server is already configured via (Claude Code), (Cursor), or (VS Code Copilot).
.mcp.json.cursor/mcp.json.vscode/mcp.jsonManual setup: If your agent doesn't auto-detect the config, run:
bash
claude mcp add vapi-docs -- npx -y mcp-remote https://docs.vapi.ai/_mcp/serverSee the README for full setup instructions across all supported agents.
本技能仓库包含一个Vapi文档MCP服务器(),可为你的AI助手提供完整的Vapi知识库访问权限。使用工具查找本技能未涵盖的内容——高级配置、故障排除、SDK细节等。
vapi-docssearchDocs自动配置: 如果你克隆或安装了这些技能,MCP服务器已通过(Claude Code)、(Cursor)或(VS Code Copilot)完成配置。
.mcp.json.cursor/mcp.json.vscode/mcp.json手动配置: 如果你的助手未自动检测到配置,请运行:
bash
claude mcp add vapi-docs -- npx -y mcp-remote https://docs.vapi.ai/_mcp/server查看README获取所有支持助手的完整设置说明。