Enables scripted content fragments to use Webhook information
Methods
Create
Register a url with hooks to the specified webhook events.
Velocity
#set($webhookResponse = $core_v2_webhook.Create($callBackUrl, $webhookEventIds, "%{ IsEnabled = $isEnabledArg }"))
JavaScript
var webhookResponse = core_v2_webhook.Create(callBackUrl, webhookEventIds, { IsEnabled: isEnabledArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
callBackUrl | String | Url that event data will be sent to | Required | ||
webhookEventIds | String | Comma delimited list of webhook event identifiers to subscribe to. | Required | ||
options | Options | Set of optional parameters including: | Required | ||
IsEnabled | Boolean | Specify if the webhook should currently receive events. | Optional |
Returns
Delete
Unregister a url completely from webhook events.
Velocity
#set($additionalInfoResponse = $core_v2_webhook.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_webhook.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id of the webhook to be unregistered | Required |
Returns
Get
Get a webhook.
Velocity
#set($webhookResponse = $core_v2_webhook.Get($id))
JavaScript
var webhookResponse = core_v2_webhook.Get(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id of webhook | Required |
Returns
List
Lists all webhooks.
Velocity
#set($apiListResponse = $core_v2_webhook.List())
JavaScript
var apiListResponse = core_v2_webhook.List();
Returns
Update
Set a specified url as subscribed to only the provided list of webhook events.
Velocity
#set($webhookResponse = $core_v2_webhook.Update($id, "%{ CallBackUrl = $callBackUrlArg, IsEnabled = $isEnabledArg, RegenerateSecret = $regenerateSecretArg, WebhookEventIds = $webhookEventIdsArg }"))
JavaScript
var webhookResponse = core_v2_webhook.Update(id, { CallBackUrl: callBackUrlArg, IsEnabled: isEnabledArg, RegenerateSecret: regenerateSecretArg, WebhookEventIds: webhookEventIdsArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id of webhook | Required | ||
options | Options | Set of optional parameters including: | Required | ||
CallBackUrl | String | Url that event data will be sent to | Optional | ||
IsEnabled | Boolean | Specify if the webhook should currently receive events. | Optional | ||
RegenerateSecret | Boolean | Specify whether the secret hash token should be regenerated. | Optional | ||
WebhookEventIds | String | Comma delimited list of webhook event identifiers to subscribe to. | Optional |