November 4, 2022

What is a Webhook & How to use it to Track Email Marketing Activity

Reading time about 4 min
What is a webhook - Sendinblue blog

Ever wonder how webhook integrations could benefit your email marketing campaigns?  Read on to find out what a webhook is and how to use it in your marketing strategy.  

Webhooks are tools that allow web apps to communicate with each other in real time. 📲 Many companies use webhooks to connect services and track their marketing efforts.

Read on to learn more about webhooks and how to use them in your email marketing campaigns.

What Is a Webhook?

A webhook (also called “reverse API” and “HTTP callback”) is a tool that allows two different  systems or web applications to share information.

Webhooks work with event-based triggers. When a specific event occurs in one web app, the webhook will send the other app notifications in real time. 🔔

Webhooks have a vast range of use cases. For example, SaaS platforms often use webhooks to share information between related services.

Ecommerce systems use webhooks to push real-time data to payment systems (Shopify and Stripe). Messaging tools also use webhooks to broadcast information from an external source (Slack).

Note that webhooks are automatic. This helps save time and improve the customer experience.

How Do Webhooks Work?

A webhook uses HTTP to send data between two applications or systems. Webhooks enable information to flow one way: from the server application to the client. 🌐

First, you need to enter the webhook URL in the client application. This is the webhook endpoint where the server will send new information.

You then need to configure the type of event you want to look for in the server application. For instance, events like user logins or customer purchases can trigger webhooks. 

Once you configure the event, the webhook will wait for the event to occur in the server application. The event will automatically trigger what is called an HTTP POST request. 

After the event occurs, the webhook will transfer data from the server app to the client app. 📥 This data is also called a payload. It often comes in XML or JSON format.

Webhook vs API: What Is the Difference?

Both webhooks and APIs (application programming interface) allow systems to share information. One of the main differences between webhooks and APIs is that APIs work by polling. 

Polling is when the client sends the server an HTTP request to check for new data periodically. You set the time interval to determine how often the server will check for new data. ⏲️

Webhooks, on the other hand, send the data as soon as the event occurs. They’re often faster than APIs and easier to set up.

The difference between Polling and Webhooks

Source: Esri

Further reading: What is an Email Marketing API and Why Should You Use One?

What Is a Webhook Used For in Email Marketing?

Email marketing services enable webhooks to track your email campaigns in real time.

Activate webhook notifications to monitor your campaigns’ progress. 📊 This allows you to act quickly in case you detect issues such as bounces or failed deliveries. Webhooks also let you track when people receive or open transactional emails.

Here are a few types of events you can track with Sendinblue thanks to webhooks:

  • Marked as spam
  • Opened
  • Clicked
  • Hard Bounced
  • Soft Bounced
  • Delivered
  • Unsubscribed
  • Contact added to a list
  • Contact updated
  • Contact deleted

How to Set Up a Webhook in Sendinblue

Try using webhooks to automate your email marketing efforts. With Sendinblue, you can activate a webhook in a few quick steps. ⚙️

Here’s how to add a new webhook on Sendinblue:

  1. Log in to Sendinblue
  2. Go to Campaigns or Contacts (depending on the event type)
  3. On either page, go to Settings 
  4. Click on Configure under Webhooks
  5. Select Add a New Webhook 
  6. Enter the URL to post to and select the events you want to track

Still testing webhooks? URL testing service Requestbin lets you create a destination URL and experiment with webhook requests. 🔗

When you’re ready, add the destination URL or endpoint in your app. This is where the Sendinblue webhook will push data after the event in the server app occurs.

Get started with email automation using Sendinblue 🚀

Sign up for free to get our full automation toolkit, pre-built workflows, unlimited contact storage and event tracking, 300 emails/day, and 40+ email templates.

Open my free Sendinblue account now >>

Ready to find your marketing zen?

Take the stress out of your work day with a solution that’s built for you!

Get started free