API开发文档

欢迎浏览我们的API开发文档!

进行呼叫

POST

要进行呼叫,向服务器发送HTTP请求

/api/calls

权限:call

Header
字段类型描述
Content-Type字符串应用或JSON
参数
字段类型描述
type字符串“录音广播”或“坐席”
from字符串坐席账号编号
to字符串呼叫目标,以国家区号开头




{
     "type": "announcement",
     "audio": "announcement.mp3",
     "from": "16472345678",
     "to": "16657489932"
 }
 {
     "type": "agent",
     "from": "agent1",
     "to": "16657489932"
 }




成功
HTTP/1.1 201 Created
 {
     "id": "c0e3dd4c-4a79-5a64-9da4-207835d11cec"
 }
错误 4XX
名称描述
AgentNotFound未找到该坐席
错误
HTTP/1.1 400 Bad Request
 {
     "error": "AgentNotFound"
 }

标签:
Table of Contents