Article Preview
Overview
Mailgun can make an HTTP POST to a callback URL when events occur with your messages.
Webhooks exist at the domain level so you can provide a unique URL for each domain; we currently do not offer account-level (global) webhooks. We recommend using bin.mailgun.net for creating temporary URLs to test and debug your webhooks.
For Webhook POSTs, Mailgun listens for the following codes from your server and reacts accordingly:
- If Mailgun receives a 200 (Success) code it will determine the webhook POST is successful and not retry.
- If Mailgun receives a 406 (Not Acceptable) code, Mailgun will determine the POST is rejected and not retry.
- For any other code, Mailgun will retry POSTing according to the following schedule (other than the delivery notification): 10 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 2 hour and 4 hours.
Each domain on your account can have a total of 3 webhooks per event type (e.g. up to 3 delivered webhooks, up to 3 unsubscribed webhooks, etc.)
Finally, we recommend our webhooks user manual.
Need Support?
Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!