POST (Header:PUT) api.ashx/v2/webhooks.{json|xml}
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
CallBackUrl | string | Request Body | Url of the Webhook to register to | Optional | ||
CallBackUrlId | int | Request Body | Id of the Webhook to update | Required | ||
IsEnabled | bool | Request Body | Disabled webhooks will not recieve any event data | Optional | ||
RegenerateSecret | bool | Request Body | If true, the hash verification secret token for this webhook will be regenerated. | Optional | ||
SubscribedWebhookIds | string | Request Body | Comma-separated list of ids of each Webhook to register to. This will set each listed webhook as subscribed, and each not listed webhook as not subscribed. | Optional |
Example Requests
Widget Javascript
jQuery.telligent.evolution.put({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/webhooks.json', data: { 'CallBackUrlId': '6' } }).then(function(response) { // use response });
Example Responses
JSON
{ "Webhook": { "Url": "url", "Id": 6, "IsEnabled": true, "Events": [ { "Name": "name", "Description": "description", "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "MessageType": "messagetype" }, { "Name": "name", "Description": "description", "Id": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "MessageType": "messagetype" } ] }, "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Webhook> <Url>url</Url> <Id>6</Id> <IsEnabled>true</IsEnabled> <Events PageSize="2" PageIndex="0" TotalCount="2"> <RestWebhookEvent> <Name>name</Name> <Description>description</Description> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <MessageType>messagetype</MessageType> </RestWebhookEvent> <RestWebhookEvent> <Name>name</Name> <Description>description</Description> <Id>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</Id> <MessageType>messagetype</MessageType> </RestWebhookEvent> </Events> </Webhook> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>