Guides · email · Everyday developer services

Mailgun email API

Email sending API from Mailgun (Sinch). Verify your domain with SPF, DKIM, MX and tracking CNAME records, then use the account key or a domain sending key.

Researched · not yet run liveLast researched 25 October 2026 · Mailgun · provider site

Researched, not yet run live. Built from the provider’s official pages (linked below). A person hasn’t walked this flow end to end yet, so check each step against the source.

Have ready

  • A domain you control with access to its DNS settings
  • DNS access for the sending domain · SPF, DKIM, MX and CNAME records are required to verify the domain. [1]Needed for: Add SPF, DKIM, MX and tracking records

Steps

Steps marked “human step” are ones only you can do: verapli never signs in, submits, pays or accepts terms for you.

  1. Sign in or create a Mailgun account

    Sign in to Mailgun. If you have no account yet, you create it yourself; verapli does not create accounts.

    • Guided by hand
    • Human step: You sign in

    Where: https://login.mailgun.com/login/

  2. Add your sending domain

    In Sending > Domains add your domain (choose the US or EU region; EU uses api.eu.mailgun.net).

    • Guided by hand
    • Human step: You press submit
    • After: Sign in or create a Mailgun account
  3. Add SPF, DKIM, MX and tracking records

    Add the TXT SPF record (v=spf1 include:mailgun.org ~all), the DKIM TXT record shown in Domain Verification & DNS, MX records (priority 10) for mxa.mailgun.org and mxb.mailgun.org, and the tracking CNAME to mailgun.org. Then click Verify DNS settings.

    • Guided by hand
    • After: Add your sending domain
    The provider says
    DNS changes can take 24-48 hours to fully propagate. [1]
    If something goes wrong (2)
    • Some DKIM keys show Unverified: Not every listed key must verify; make sure the key your domain configuration uses is correct in DNS. [1]
    • Verification has not completed: Confirm the records exist, allow for propagation, then run Verify DNS settings again. [1]
  4. Create a domain sending key

    In Domain Settings > Sending API keys click Add Sending Key. It can only send for that domain. It is shown only once. (The primary account key in Account Settings > API Keys has full access.)

    • Guided by hand
    • Human step: You press submit
    • After: Add your sending domain

    verapli captures MAILGUN_API_KEY here by plain code: encrypted in your browser, never shown to AI.

Terms and gotchas

Plain-English summary, not legal advice. Each card links its source.

Can get you bannedThe rules say

Consent required, no third-party lists

Non-transactional mail only to recipients with clear, explicit and provable consent; acquiring or sending to third-party lists is prohibited. [5]

Can cost moneyThe rules say

Sending thresholds

Keep bounces at or below 5%, spam complaints at or below 0.08% and blocks below 20%. [5]

What you end up with

Env varSecretFormatWhat it is
MAILGUN_API_KEYsecretMailgun API key (domain sending key recommended)

Pricing

  • Free tier: 100 emails/day.
  • Costs: Basic from $15/month (10,000 emails); Foundation $35/month (50,000); Scale $90/month (100,000).

Source [4]

For agents

The same entry as JSON: /api/v1/entries/mailgun/email · requirements /api/v1/requirements/mailgun/email · terms /api/v1/terms/mailgun/email.

Remote MCP (read-only, no auth)
claude mcp add --transport http verapli https://verapli.com/mcp

> "What do I need for Mailgun email API, and how long will it take?"
  → tools/call requirements { "provider_id": "mailgun/email" }

Sources

  1. Mailgun docs - Verify your domain Required records TXT SPF v=spf1 include:mailgun.org ~all, DKIM TXT from control panel, tracking CNAME to mailgun.org, MX priority 10 mxa.mailgun.org and mxb.mailgun.org; Verify DNS settings; 24-48 hours propagation; DKIM unverified keys note; verified domains exempt from the 300 emails per day limit · accessed 25 October 2026 · official
  2. Mailgun docs - Authentication Basic auth user api; primary account API key at Account Settings > API Keys; Domain Sending Key limited to /messages for one domain, created in Domain Settings > Sending API keys, shown only once · accessed 25 October 2026 · official
  3. Mailgun docs - Node.js SDK MAILGUN_API_KEY env var in examples; EU url option https://api.eu.mailgun.net · accessed 25 October 2026 · official
  4. Mailgun pricing Free $0 with 100 emails/day; Basic from $15/mo for 10,000 emails; Foundation $35/mo; Scale $90/mo · accessed 25 October 2026 · official
  5. Sinch Email (Mailgun) Acceptable Use Policy Third-party lists prohibited; clear, explicit, provable consent; proof of consent on escalated complaints; thresholds bounces <=5%, spam complaints <=0.08%, blocks <20%, unsubscribes <=1.4% · accessed 25 October 2026 · official

Provider rules change. This page is generated from verapli registry version 2026.1025.387; spotted something out of date? Tell us. Mailgun is not affiliated with verapli.