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

Parameters:
No Parameters
Response:

An array of   Webhook

Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/webhooks \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

[{"id":"69FAB2B6-1189-4B96-BD06-1CBDADBC1164","event":"chatStarts","targetUrl":"http://www.google.com"}]
Get a single Webhook

GET livechat/webhooks/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/webhooks/69FAB2B6-1189-4B96-BD06-1CBDADBC1164 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"69FAB2B6-1189-4B96-BD06-1CBDADBC1164","event":"chatStarts","targetUrl":"http://www.google.com"}
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://api15.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

{"id":"69FAB2B6-1189-4B96-BD06-1CBDADBC1164","event":"chatStarts","targetUrl":"http://www.google.com"}
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://api15.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

{"id":"69FAB2B6-1189-4B96-BD06-1CBDADBC1164","event":"chatStarts","targetUrl":"http://www.google.com"}
Remove the Webhook

DELETE livechat/webhooks/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/webhooks/69FAB2B6-1189-4B96-BD06-1CBDADBC1164 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content