v1

latestSwagger 2.0MIT2026-07-17233380637.0 KB
Webhooks

Create a webhook

post/webhooks

Request body

urlstring url required

URL of the webhook

descriptionstring

Description of the webhook

eventsstring[] required
  • Events triggering the webhook. 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

  • Possible values for Inbound type webhook:

inboundEmailProcessed

type'transactional' | 'marketing' | 'inbound'

Type of the webhook

domainstring

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

batchedboolean

To send batched webhooks

Example request

{
  "url": "http://requestb.in/173lyyx1",
  "description": "Webhook triggered on unsubscription",
  "events": [
    "unsubscribed"
  ],
  "type": "marketing",
  "domain": "example.com",
  "batched": true,
  "auth": {
    "type": "bearer",
    "token": "test-auth-token1234"
  },
  "headers": [
    {
      "key": "cf-secret",
      "value": "test-header-value"
    }
  ]
}

Response

Webhook created

idinteger required

ID of the object created

Example response

{
  "id": 122
}