External webhooks are resources that allow Maileon to instantly submit information to a third party system when a given event like an unsubscription occurs. Webhooks usually use/ simple POST requests to submit the information. If the product is enabled for you, you can set up the webhooks in Maileon under “Settings -> Webhooks”
Possible event types:
- DOI confirmation
- Bounce (for a list of bounce codes, please check this page: bounce codes)
- Mails that failed to send due to personalization errors
Basically the webhook requires only the URL. If nothing further is specified, Maileon will trigger a POST request to the given URL without sending any data. The receiving system can use this trigger to issue further actions.
For submitting simple data also URL-Parameters can be passed, e.g. “firstname=Max&lastname=Mustermann”. These can be used by the receiving system to fill some details about the contact.
Finally Maileon also allows submitting data in the body of the POST request. The content type will be set to “application/json; charset=UTF-8” and the body will contain a JSON entity bearing the information.
We prepared a simple example that catches and displays THE LAST received data. The example also displays the instructions on how to set up the webhook in Maileon.
The example shows the results at the bottom. It shows the complete URL (in case you use URL-Parameters) and the body of the last POST to the page. You can use this JSON to start implementing your receiving service. To ease this process you can also download the example page itself (PHP) using the download button on the bottom of the page.