Batched webhooks

Receive transactional or marketing events in batches.

You can make use of this option when you receive high volumes of events in a short time frame. This is more efficient as it would send multiple events in one go, instead of sending single webhook everytime.

How it works

For webhooks, a new boolean parameter is introduced called batched.
You can choose true to enable batch sending or falseto disable batch sending. This condition should be applied on the create webhook endpoint.

There are some points you need to consider for batch webhooks.

  • The events will be accumulated in windows of 5 minutes.
  • After 5 minutes, one batch is sent regardless of the number of events processed during that time.
  • The amount of events in one batch is by default 500.
curl --location '' \
--header 'content-type: application/json' \
--header 'api-key: xkeysib-{api-key}' \
--data '{
    "description" : "string",
    "url" : "https://username:[email protected]/notifyurl3234121232",
    "events" : ["sent"],
    "batched"  : true,
    "type" : "transactional"

If your batch exceeds 500 events

If your batch is more than 500 events then more than one batch is sent at the end of the 5 minute window. One batch consists of 500 events. There could be multiple batches which is relative to the amount of events processed during that time.

If your batch is less than 500 webhooks

If your batch is less than 500 events withing the 5 minute window then they are sent regardless. Any amount of events that accumulate in 5 minutes are pushed to your webhook.