WebHooks

Posted on Mar 04, 2016 17:00

With this API call you can manage your WebHooks.

 

JSON Format

 

Each WebHook is represented as JSON object with the following properties:

Name Type Description
 Id  string  The webhook's id
 AgentId  number  The agent's id who have subscribed
 Events  array  The list with the events
 WebHookUri string  The URI where the notification will be send

 

 

Get All WebHooks

 

GET /api/webhooks

Get all WebHooks for your account.

 

Example response

[

    {

        "Id": "08978c28383944b0b1a987e2edbfdeb9",

        "AgentId": 150,

        "Events": [

            "chat_started"

        ],

        "WebHookUri": "https://mywebsite.com/webhookcallback"

    },

    {

        "Id": "b9ff263f767f4ed38356c4fe05358bff",

        "AgentId": 151,

        "Events": [

            "chat_started"

        ],

        "WebHookUri": "https://mywebsite.com/webhookcallback"

    }

]

 

 

Get WebHook by Id

 

GET /api/webhooks/{webhook_id}

Get a WebHook from your account by specified id.

 

Example response

{

    "Id": "08978c28383944b0b1a987e2edbfdeb9",

    "AgentId": 150,

    "Events": [

        "chat_started"

    ],

    "WebHookUri": "https://mywebsite.com/webhookcallback"

}

 

 

Delete WebHook

 

DELETE /api/webhooks/{webhook_id}

Delete a WebHook from your account by specified id.