Webhooks
Quản lý Webhook
Danh sách webhook
GET [URL/api/webhooks/list
Danh sách webhook
Headers
Name
Type
Description
Authorization
string
Bearer "Access token"
{
"instance_id": "stg",
"payload": [
{
"url": "https://webhook.site/8d9fea3d-fba0-445b-95e0-afc921ec2e74",
"type": "call",
"status": "actived",
"events": null,
"headers": []
},
{
"url": "https://webhook.site/8d9fea3d-fba0-445b-95e0-afc921ec2e74",
"type": "call_event",
"status": "actived",
"events": [
"ringing",
"answered",
"hangup"
],
"headers": []
}
],
"instance_version": "1.2.164",
"key_enabled": false,
"status_code": 9999
}Đăng ký Webhook
POST [URL]/api/webhooks/register
Ghi danh Webhook
Headers
Name
Type
Description
Authorization
string
Bearer "Access token"
Request Body
Name
Type
Description
webhook
object
Đối tượng : - type : Loại Webhook : call, contact - url : Đường dẫn Webhook - events : ["ringing",",answered","hangup"]
{ "webhook" : { "type" : "call", "url" : "https://...." ,
"events": null } }
Hủy Webhook
POST [URL]/api/webhooks/destroy?hook_type=
Hủy đăng ký Webhook
Query Parameters
Name
Type
Description
hook_type
string
Một trong các giá trị sau - call : Lịch sử cuộc gọi
Headers
Name
Type
Description
Authorization
string
Bearer "Access token"
Last updated
