Mailgun

Mailgun

Developer Tools

Email API for sending, tracking and receiving transactional email.

Signature verification supported 6 events supported

Why use Hookfire with Mailgun?

Instant push notifications

Get notified on your phone the moment a Mailgun webhook fires. No more checking dashboards.

Subscribe to what matters

Choose exactly which Mailgun events trigger notifications. Filter out the noise.

Team-wide delivery

Control who on your team gets notified and how: push notifications, record only, or both.

Setup in under 2 minutes

Copy a webhook URL, paste it in Mailgun, and you're done. No code required.

Supported events

Event
Unsubscribed
unsubscribed
👋 Unsubscribed: recipient@sample.mailgun.com
They opted out of email from sample.mailgun.com
Delivered
delivered
✅ Delivered to recipient@sample.mailgun.com
Sample webhook payload
Opened
opened
👀 Opened by recipient@sample.mailgun.com
On Apple Mail, mobile
Delivery failed
failed
📭 Email failed (permanent): badrecipient@sample.mailgun.com
Sample webhook payload - 5.5.0 Requested action not taken: mailbox unavailable
Link clicked
clicked
🔗 recipient@sample.mailgun.com clicked a link
https://sample.mailgun.com
Spam complaint
complained
🚨 Spam complaint from recipient@sample.mailgun.com
Sample webhook payload - sample.mailgun.com

How to connect Mailgun

Step 1: Create an Integration

  1. Go to your organization’s Integrations page.
  2. Click Add Integration and select Mailgun.
  3. You’ll receive a unique Webhook URL. Copy it.

Step 2: Add the Webhook in Mailgun

  1. In Mailgun, go to Send → Sending → Webhooks and click Add webhook.
  2. Choose a domain webhook (one sending domain) or an account webhook (every domain).
  3. Paste your Hookfire webhook URL and pick the event types, for example Permanent Failure, Spam Complaints and Unsubscribes.
  4. Save it.

US and EU accounts are separate, so add the webhook in each region you send from. See Mailgun’s webhook docs.

Step 3: Signing Secret

  1. In Mailgun, go to Settings → API Security and copy the HTTP webhook signing key. It is not your API key.
  2. Paste it into the Signing Secret field on your Hookfire integration page.

Mailgun signs each event inside the body (signature.timestamp, signature.token, signature.signature), and Hookfire refuses anything that does not match.

Step 4: Subscribe to Events

On your Hookfire integration page, toggle on the events you want to receive push notifications for.

Permanent and temporary failures both arrive as failed, with the severity in the title. On the Max plan you can add a payload rule on event-data.severity equal to permanent to be told only about hard bounces.

Step 5: Test

Click Test next to an event on your Hookfire integration page to send a sample through the pipeline.

Supported Events

Event Description
failed A message could not be delivered (permanent or temporary)
complained A recipient marked a message as spam
unsubscribed A recipient unsubscribed
delivered A message was accepted by the recipient’s server
opened A recipient opened a message (needs open tracking)
clicked A recipient clicked a link (needs click tracking)

Get started with Mailgun

Start receiving instant push notifications for your Mailgun webhooks. Free to start, no credit card required.

Get Started Free