Create a webhook

Creates a new webhook to receive real-time notifications for specified events. Use this to: - Set up event notifications for transactional or marketing emails - Configure webhook endpoints for campaign tracking - Enable real-time monitoring of email delivery status - Subscribe to contact list changes and updates - Implement custom event handling and automation Key information returned: - Created webhook ID and configuration - Success confirmation and setup details

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Values to create a webhook
urlstringRequiredformat: "url"
URL of the webhook
authobjectOptional
Add authentication on webhook url
batchedbooleanOptional
To send batched webhooks
channelenumOptionalDefaults to email
Channel of the webhook
Allowed values:
descriptionstringOptional
Description of the webhook
domainstringOptional

Inbound domain of webhook, required in case of event type inbound

eventslist of enumsOptional
Events triggering the webhook. Required for transactional and marketing types, optional for inbound type (defaults to `inboundEmailProcessed`). Possible values for **Transactional** type webhook: `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed`. Possible values for **Marketing** type webhook: `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, `delivered`, `contactUpdated` & `contactDeleted`. Possible values for **Inbound** type webhook: `inboundEmailProcessed`.
headerslist of objectsOptional
Custom headers to be send with webhooks
typeenumOptionalDefaults to transactional
Type of the webhook
Allowed values:

Response

successfully created
idlong
ID of the object created

Errors

400
Bad Request Error