API开发文档
欢迎浏览我们的API开发文档!
回调数据
以下列出了请求对象体的样例,不同的事件发生时会接收到url
/api_url
新建呼叫
{
"account": "demo",
"caller_id_name": "Demo",
"caller_id_number": "16471230000",
"destination_number": "16471234567",
"event": "NewCall",
"event_time": "2017-03-23T21:47:07Z",
"id": "4b847e58-2324-4f1c-8385-754769c46b1c",
"start_time": "2017-03-23T21:47:07Z"
}
进入队列
{
"account": "demo",
"caller_id_name": "Demo",
"caller_id_number": "16471230000",
"destination_number": "16471234567",
"event": "EnterQueue",
"event_time": "2017-03-23T21:47:07Z",
"id": "4b847e58-2324-4f1c-8385-754769c46b1c",
"queue": "receptionists",
"start_time": "2017-03-23T21:47:07Z"
}
振铃
{
"account": "demo",
"agent": "rcp1",
"caller_id_name": "Demo",
"caller_id_number": "16471230000",
"destination_number": "16471234567",
"event": "Ringing",
"event_time": "2017-03-23T21:50:20Z",
"id": "c6537a05-71ea-4572-8bb1-790518268fdf",
"queue": "receptionists",
"start_time": "2017-03-23T21:50:21Z"
}
接听
{
"account": "demo",
"agent": "rcp1",
"caller_id_name": "Demo",
"caller_id_number": "16471230000",
"destination_number": "16471234567",
"event": "Answer",
"event_time": "2017-03-23T21:50:23Z",
"id": "c6537a05-71ea-4572-8bb1-790518268fdf",
"queue": "receptionists",
"start_time": "2017-03-23T21:50:21Z"
}
挂机
{
"account": "demo",
"caller_id_name": "Demo",
"caller_id_number": "16471230000",
"destination_number": "16471234567",
"end_time": "2017-03-23T21:47:17Z",
"event": "Hangup",
"event_time": "2017-03-23T21:47:17Z",
"id": "4b847e58-2324-4f1c-8385-754769c46b1c",
"queue": "receptionists",
"agent": "agent1",
"start_time": "2017-03-23T21:47:07Z"
}
获取短信
{
"messageId": "SMS_SM06745ab9f08b4945c5e197a32ac1b402",
"from": "16471230000",
"to": "14165784567",
"text": "Hiii",
"charge": 15,
"time": "2017-11-24T21:54:02.098Z"
}