Webhook
You need the Manage Integration permission to manage Webhook.
Webhooks
- Webhooks Manage
GET livechat/webhooks
GET livechat/webhooks/{id}
POST livechat/webhooks
PUT livechat/webhooks/{id}
DELETE livechat/webhooks/{id}
Model
Webhook JSON Format
Webhook is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id |
guid | Id of the webhook. |
event |
string | Allowed values are "offlineMessageIsSubmitted", "chatStarts", "chatEnds", "chatIsWrappedUp", "agentStatusChanges", "chatIsRequested", "chatIsTransferred". |
targetUrl |
string | Target url of the webhook. |
Endpoint
Get the list of Webhooks
GET livechat/webhooks
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/webhooks \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Get a single Webhook
GET livechat/webhooks/{id}
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/webhooks/69FAB2B6-1189-4B96-BD06-1CBDADBC1164 \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Create a new Webhook
POST livechat/webhooks
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
event |
string | body | yes | Allowed values are "offlineMessageIsSubmitted", "chatStarts", "chatEnds", "chatIsWrappedUp", "agentStatusChanges", "chatIsRequested", "chatIsTransferred". |
targetUrl |
string | body | yes | Target url of the webhook. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/webhooks \
-X
'POST'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{"event":"chatStarts","targetUrl":"http://www.google.com"}'
Response:
HTTP/1.1 201 Created
Update the Webhook
PUT livechat/webhooks/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
event |
string | body | yes | Allowed values are "offlineMessageIsSubmitted", "chatStarts", "chatEnds", "chatIsWrappedUp", "agentStatusChanges", "chatIsRequested", "chatIsTransferred". |
targetUrl |
string | body | yes | Target url of the webhook. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/webhooks/69FAB2B6-1189-4B96-BD06-1CBDADBC1164 \
-X
'PUT'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{"event":"chatStarts","targetUrl":"http://www.google.com"}'
Response:
HTTP/1.1 200 OK
Remove the Webhook
DELETE livechat/webhooks/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/webhooks/69FAB2B6-1189-4B96-BD06-1CBDADBC1164 \
-X
'DELETE'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 204 No Content