# Mailgun with Notifly

Canonical page: https://notifly.io/integrations/mailgun
Last updated: 2026-10-15

A Mailgun API key and sending domain on the US or EU endpoint. Custom headers, reply-to and inline images carry through to Mailgun.

## What you need from Mailgun

The fields the dashboard asks for when you connect Mailgun, from its Delivery Provider Credentials form:

| Field | Required | Stored | Notes |
| --- | --- | --- | --- |
| API Key | Required | Encrypted at rest |  |
| Base URL | Optional | As entered |  |
| User name | Required | As entered |  |
| Domain | Required | As entered |  |
| From email address | Required | As entered | Use the same email address you used to authenticate your delivery provider |
| Sender name | Required | As entered |  |

## Connect Mailgun in the dashboard

1. Sign in at https://app.notifly.io, open Integration Store in the sidebar and choose Connect Provider.
2. In the Connect Integration sheet, open the E-Mail tab, find Mailgun and choose Connect.
3. Pick the environment the integration belongs to. Development and Production keep separate integrations.
4. Fill in Delivery Provider Credentials with the fields above, then choose Create Integration.

## Trigger a notification

```bash
curl -X POST https://api.notifly.io/v1/events/trigger \
  -H "Authorization: ApiKey $NOTIFLY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<workflow-id>","to":{"subscriberId":"<subscriber-id>"},"payload":{"body":"Hello from Notifly"}}'
```

## What Notifly adds around Mailgun

- Workflows around the send: One trigger runs a workflow: this provider’s step can sit beside in-app, email, SMS, push and chat steps, behind digest, delay and throttle steps.
- Subscriber preferences, enforced at send: Before each step runs, the subscriber’s workflow and channel preferences are checked; an opted-out step is skipped and the reason is recorded.
- An in-app Inbox next to it: The same workflow can write to the Notifly Inbox, a real-time in-app feed you embed with the React component or the JavaScript SDK.
- Per-trigger provider parameters: Anything the trigger passes under overrides.providers.<provider id> is merged into the request Notifly sends to the provider, per workflow or per step.
- Activity you can debug: Every message gets execution details in the activity feed, including the response or error the provider returned.
- Secrets encrypted at rest: API keys, tokens and service accounts are stored encrypted with AES-256; new and re-saved credentials use authenticated AES-256-GCM. The table above marks which of this provider’s fields that covers.
- Several accounts, one primary: Connect more than one account on this channel. The primary integration is the default; another active integration takes the send when its conditions match the subscriber or the tenant in the trigger’s context.

## More

The full guide, with provider-specific setup, code samples and answers to common questions: https://notifly.io/integrations/mailgun

All provider guides: https://notifly.io/integrations (markdown: https://notifly.io/integrations.md)
