Webhooks: Getting Started
Webhooks provide a method for your application to be notified when events happen within BigMailer. We notify your application by making HTTP calls with event data to a URL you provide (called an endpoint).
To use webhooks, you must add a script, handler, or route to your application and then add the URL for the script as a webhook endpoint in the BigMailer console.
Building a Webhook Endpoint
Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an object.
Creating a webhook endpoint on your server is no different from creating any page on your website. With PHP, you might create a new .php file on your server; with a Ruby framework like Sinatra, you would add a new route with the desired URL.
If your endpoint successfully processes the event, it should issue a response with any 2xx status code. If it fails, it should issue a response with any 4xx or 5xx code (400, 404, 500, etc). In event of failure, the webhook is retried. BigMailer does not check the response body (we advise returning an empty string to save bandwidth).
For more details, please see:
Adding an Endpoint to BigMailer
Updated over 3 years ago