Batched webhooks

Use this option when you receive high volumes of events in a short time frame. It’s more efficient because it sends multiple events together instead of one webhook per event.

How it works

Webhooks support a boolean parameter called batched. Set it to true to enable batch sending or false to disable it. Apply this on the create webhook endpoint.

Considerations for batch webhooks:

  • Events accumulate in 5-minute windows.
  • After 5 minutes, one batch is sent regardless of how many events were processed.
  • Each batch contains up to 500 events by default.
curl --location 'http://api.brevo.com/v3/webhooks' \
--header 'content-type: application/json' \
--header 'api-key: xkeysib-{api-key}' \
--data '{
"description" : "string",
"url" : "https://username:password@hook.znapi.cc/ix0v9y",
"events" : ["sent"],
"batched" : true,
"type" : "transactional"
}'

If your batch exceeds 500 events

If more than 500 events accumulate, multiple batches are sent at the end of the 5-minute window. Each batch contains 500 events. The number of batches depends on the volume of events processed during the window.

If your batch is less than 500 events

If fewer than 500 events accumulate within the 5-minute window, they are sent anyway. Any events accumulated in the 5 minutes are pushed to your webhook.