Webhooks
Quản lý Webhook
Danh sách webhook
GET [URL/api/webhooks/list
Danh sách webhook
Headers
Name
Type
Description
Authorization
string
Access token
{
    "status_code": 9999,
    "instance_id": "stg",
    "payload": [
        {
            "url": "https://demo.omicall.com/omicall/updatecall",
            "type": "call",
            "status": "actived"
        }
    ],
    "key_enabled": false
}Đăng ký Webhook
POST [URL]/api/webhooks/register
Ghi danh Webhook
Headers
Name
Type
Description
Authorization
string
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
  } 
}
{
    "status_code": 9999,
    "instance_id": "stg",
    "payload": [
        {
            "url": "https://demo.omicall.com/omicall/updatecall",
            "type": "call",
            "status": "actived"
        }
    ],
    "key_enabled": false
}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
Access token
Last updated
Was this helpful?
