Webhooks

Introduction

Attention! This is an old Webhooks documentation - this version will be active until December 31, 2021.

This version of Webhooks will be phased out. Please migrate to the new version.

The Webhooks mechanism is a simple way to receive real-time notifications. Webhook is a mechanism similar to API, but communication is done in reverse, meaning you define a URL gateway (callback URL) under which you will receive notifications about various events in the system. Each event will be an HTTP POST request sent to the URL address you specified. In practice, you need to write a script that will be able to handle HTTP POST requests sent from the FreshMail system.

At this moment, we have one version of the Webhooks mechanism, which will notify you via HTTP POST requests about events that occurred within the sent email campaigns (e.g. open, click).

For developers

The Webhooks mechanism requires the implementation of a script that will be able to receive data and confirm their receipt.

Requirements

Remember that the scripts you create must be optimized enough to handle a large number of requests. Each request can contain up to 1000 events and must be handled within 5 seconds at most. If you are unable to handle our requests quickly enough, we recommend postponing them in some mechanisms on your side, and we will respond that we have successfully received them. If you are unable to handle the request in less than 5 seconds on our side, it is treated as an incorrect response, and exactly the same events will be sent to you again in the future.