Webhooks Overview

Mailazy Webhooks Overview and Specification


What is a webhook?

A webhook is the act of Mailazy making an HTTP POST request to your application’s API when an event occurs. This way Mailazy can immediately notify you when an event occurs.

Protecting your webhook

For Mailazy to communicate with your application, you will need a publicly accessible URL. You should protect this URL so that malicious actors cannot manipulate your data. The following factors can be considered to protect your URL.

IPs for firewalls

If you’re using a firewall, you can configure it to only allow requests from the IP range that Mailazy uses for webhooks. You can contact Mailazy for details related to the IP range.

Basic HTTP authentication

Another easy way to protect your API is through basic HTTP authentication. Almost all web servers can be configured to require a user name and password for access to a URL. You can configure your webhook URL with basic HTTP authentication by adding the user name and password to the URL https://example.com/webhook in the following format and setting the result as the webhook URL:

https://<username>:<password>@example.com/webhook

To ensure your data is encrypted, we highly recommend using (SSL) for your webhook URL.

Bearer Token:

Webhook URL with Bearer Token by adding the token to the Mailazy webhook configuration and selecting authentication type as Bearer Token.

Headers:

Headers can also be appended to each created webhook thus any header based auth workflow can be achieved.

https://example.com/webhook
X-Custom-Header: <configured-value>

The date timestamps within webhook data will be in Unix time format.