Setup
Add your sender domain in the Mailgun dashboard. Mailgun shows a list of DNS records (TXT for SPF + DKIM, optional MX for inbound).
Add those records at your DNS host. Mailgun re-verifies automatically every few minutes.
Settings → API security → grab the Private API key.
Brand → Provider → pick Mailgun. Paste:
domain— the verified sending domainregion—usoreuapi_key— the private API key
EU vs US
Mailgun isolates domains per region. If you signed up in the EU, your domain lives on api.eu.mailgun.net; US domains use api.mailgun.net. Pick the matching region in Maillayer or the API call will 404.
Webhooks
Sending → Webhooks → add an endpoint per event:
https://<your-app>/api/webhooks/mailgun/<brandId>Subscribe to Permanent failure and Spam complaint at minimum. Maillayer verifies the webhook signature against your private key.
sandbox*.mailgun.org domain that only delivers to verified-recipient addresses. Add and verify your own domain before running real campaigns.