Skip to main content

Create webhooks to receive real-time updates about your emails and contacts

If you're familiar with the detailed metrics Brevo offers for emails, you know how overwhelming it can be to try and make sense of it all. Instead of sifting through a haystack of data to find the information you need, webhooks allow you to receive the right data directly, allowing you to access the important details you need without any hassle.

What is a webhook?

Webhooks can be defined as notifications that are triggered by specific events. They are typically used to facilitate communication between multiple systems. Essentially, webhooks provide a straightforward means of receiving alerts whenever an event happens in another system.

In more technical terms, a webhook is an HTTP callback that allows multiple systems to interconnect and keep actions consistent between them. When an event occurs in a system, a POST request is sent to the given URL in real time. This HTTP POST request contains information related to that specific event, e.g. the time it occurred, the name of the event, and key identifiers.

How do webhooks work in Brevo?

At Brevo, a webhook is a URL that you can integrate into our system to receive real-time updates on events related to the sending of your marketing and transactional emails and the management of your contacts. With webhooks, you have the ability to track specific events that interest you, such as when an email has been opened or a contact has been deleted.

There are multiple types of events you can track. For example, you can receive notifications on the status of your ongoing marketing campaign and know how it's performing in real time. You can also track when your transactional messages are being sent, delivered, or opened by your recipients. Or you can also be notified about changes on your contacts.

What events are available in Brevo?

All the available events that you can track in Brevo are grouped into two categories: 

Marketing events Transactional events
When an email is: When a contact is:
  • Marked as Spam
  • Hard Bounced
  • Delivered
  • Opened
  • Unsubscribed
  • Clicked
  • Soft Bounced
  • Added to a list
  • Updated
  • Deleted

You can find more information about marketing events and their associated data in our API documentation.

Create your webhook

💡 Good to know
You can create up to 40 webhooks for marketing and transactional emails. 

For our examples, we will focus on the "Opened" event from the transactional platform. Basically, whenever we send a new transactional email, we will receive a notification via our webhook indicating that the email has successfully hit the recipient's inbox.

From Campaigns and Transactional From an automation From the API
  1. Go to the Webhooks page:
  2. Click Add a new webhook.
  3. In the URL field, enter the notification URL where the event data will be pushed whenever the event is triggered. 
  4. In the When the message is or When the contact is fields, select the events that you want to receive notifications for.
  5. In the Description field, enter a description for the webhook.

  6. Once you're done, click Save.
  7. Once you've created your webhook, we recommend you test it. Next to the webhook you have created, click Actions > Send a test or Test. Once the event has been triggered, you will receive a notification on the URL you specified for the webhook.

Secure your webhook

Once you have created and tested your webhook, we recommend you secure it to ensure it is not accessible to other parties on the web. To secure your webhooks, you need to whitelist the following Brevo IP ranges:

  • 185.107.232.0/24
    • First IP address: 185.107.232.1
    • Last IP address: 185.107.232.254
  • 1.179.112.0/20
    • First IP address: 1.179.112.1
    • Last IP address: 1.179.127.254
💡 Good to know
These IP ranges relate to marketing webhooks, transactional webhooks, and webhooks called directly from an automation.

🤔 Have a question?

If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.

💬 Was this article helpful?

3 out of 22 found this helpful