--- title: "Webhook" slug: "server-api-livechat-webhook" updated: 2022-06-16T06:28:23Z published: 2022-06-16T06:28:23Z canonical: "developer.comm100.com/server-api-livechat-webhook" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Webhook ## Webhook You need the Manage Integration permission to manage Webhook. - `Webhooks` - Webhooks Manage - `GET livechat/webhooks` - [Get the list of Webhooks](/docs/server-api-livechat-webhook#get-the-list-of-webhooks) - `GET livechat/webhooks/{id}` - [Get a single Webhook](/docs/server-api-livechat-webhook#get-a-single-webhook) - `POST livechat/webhooks` - [Create a new Webhook](/docs/server-api-livechat-webhook#create-a-new-webhook) - `PUT livechat/webhooks/{id}` - [Update the Webhook](/docs/server-api-livechat-webhook#update-the-webhook) - `DELETE livechat/webhooks/{id}` - [Remove the Webhook](/docs/server-api-livechat-webhook#remove-the-webhook) ### 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. | ### Get the list of Webhooks `GET livechat/webhooks` - #### Parameters: No Parameters - #### Response: An array of [Webhook](/docs/server-api-livechat-webhook#webhook-json-format) - #### Example Sample Request: ``` curl https://api11.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: [Webhook](/docs/server-api-livechat-webhook#webhook-json-format) - #### 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 ``` { "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: [Webhook](/docs/server-api-livechat-webhook#webhook-json-format) - #### 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 ``` { "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: [Webhook](/docs/server-api-livechat-webhook#webhook-json-format) - #### 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 ``` { "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://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