Pre-Built Tooling
Category | Details |
---|---|
Authentication | HTTP Basic Authentication (API Key) |
Two-Way Sync | No |
Events Supported | Yes (via webhooks) |
Realtime | Yes (webhooks for delivery events) |
Supports Rate Limiting | Yes |
Authentication Scopes Supported | N/A (API key-based authentication) |
Objects Supported
Alloy Automation supports syncing the following objects from Mailgun: Based on the Mailgun API, typical objects include:- Messages
- Events
- Domains
- Mailing Lists
- Routes
- Webhooks
- Suppressions (Bounces, Unsubscribes, Complaints)
Set Up Guide
Trial Access
Question | Answer |
---|---|
Offers free trial? | Yes. Mailgun offers a free trial with 5,000 emails per month for the first 3 months. Sign up for free trial |
Requires paid sandbox | No. A sandbox domain is provided for testing without a paid account. |
Requires partnership to obtain authentication? | No. Anyone can sign up and obtain API keys. |
Authentication (API Key)
Mailgun uses HTTP Basic Authentication with API keys.Obtain your API key
- Go to Mailgun (https://www.mailgun.com/) and sign up for an account or log in.
- Navigate to Settings → API Keys in the Mailgun dashboard.
- You’ll see your Private API Key listed. This is the key you’ll use for authentication.
- Copy the API key - it should start with
key-
followed by a string of characters. - In Alloy Automation, when prompted for credentials:
- Username: Enter
api
(literally the word “api”) - API Key: Paste your Private API Key from Mailgun
- Username: Enter
Important Notes
- Mailgun uses HTTP Basic Auth with the username
api
and your API key as the password. - Keep your Private API Key secure - it provides full access to your Mailgun account.
- Mailgun has separate endpoints for US (
api.mailgun.net
) and EU (api.eu.mailgun.net
) regions. - You can create multiple API keys with different permissions for different applications.
Domain Verification
- Before sending production emails, verify your domain in Mailgun by adding DNS records.
- The sandbox domain can be used for testing but has limited recipient addresses.
Use Cases
1) Transactional email delivery
Send transactional emails (password resets, order confirmations, notifications) from your application through Mailgun’s reliable infrastructure with tracking for delivery, opens, clicks, and bounces.2) Email deliverability monitoring
Track email deliverability metrics by pulling Mailgun event data (delivered, bounced, complained, failed) into your analytics platform to identify and resolve delivery issues quickly.3) Automated suppression list management
Synchronize Mailgun’s suppression lists (bounces, unsubscribes, complaints) with your user database to prevent sending to invalid addresses and maintain sender reputation.4) Multi-channel notification routing
Route application notifications through Mailgun while using Alloy Automation to implement fallback mechanisms to SMS or push notifications when emails bounce or aren’t opened within a timeframe.5) Webhook event processing
Consume Mailgun webhook events for email interactions (opens, clicks, unsubscribes) and trigger downstream workflows like updating CRM records, adjusting user segments, or sending follow-up communications.API Gotchas
-
Mailgun uses HTTP Basic Authentication where the username is always the literal string
api
(not your Mailgun username) and the password is your API key. Many developers mistakenly use their account credentials instead. -
The API has regional endpoints - US (
api.mailgun.net
) and EU (api.eu.mailgun.net
). You must use the correct endpoint for your account region, otherwise all requests will fail with authentication errors. - When sending emails via API, recipient validation is strict. Email addresses must be properly formatted, and the sandbox domain can only send to authorized recipients (addresses you’ve verified in the dashboard).
-
Rate limits vary by endpoint and account tier. The
/messages
endpoint typically allows 1,000 requests per day on free trials, but this can be exhausted quickly with high-volume applications. Always check theX-RateLimit-*
response headers.
For questions or troubleshooting, contact support@runalloy.com.