For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
      • GETGet all webhooks
      • POSTCreate a webhook
      • GETGet a webhook details
      • PUTUpdate a webhook
      • DELDelete a webhook
      • POSTExport webhook history
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Accounts and SettingsWebhooks

Create a webhook

POST
https://api.brevo.com/v3/webhooks
POST
/v3/webhooks
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.webhooks.createWebhook({
8 url: "http://requestb.in/173lyyx1",
9 });
10}
11main();
1{
2 "id": 5
3}
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
Was this page helpful?
Previous

Get a webhook details

Next
Built with

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

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.