Providers / Mailgun

Email

Mailgun API keys and credentials

What every Mailgun credential a founder holds does, whether it expires, and what tends to break. Each fact links to Mailgun's own docs.

Last checked 2026-11-06 · www.mailgun.com

Our research on Mailgun is still thin. Treat this page as a starting point and check the linked docs.

At a glance

CredentialExpiryPermissions
Mailgun account loginNot documented–
Primary account API key (private)Not documentedFull access only
Domain sending keyNot documentedCan be scoped
SMTP credentials (per domain)Not documentedNot documented

Each credential

Mailgun account login

Dashboard login. Password/2FA policy not confirmed in sources.

Mailgun docs

Primary account API key (private)

Generated at sign-up; viewable under Account Settings > API Keys. Allows all CRUD operations on any sending domain in the account. Shown only once; if lost, create a new key. No expiry or rotation process is documented on the authentication page.

Mailgun docs

Domain sending key

Only allows sending messages, and is created per domain from the domain's Sending settings. Shown only once.

Mailgun docs

SMTP credentials (per domain)

Login and password pair for SMTP sending, created with POST /v3/domains/{domain}/credentials (basic auth with the API key) or in the dashboard under Domain settings > SMTP credentials. Password is omitted from responses after creation; update via PUT on the credential path. Password is generated if none supplied. Expiry and rotation policy not documented in sources reviewed.

Mailgun docs

What usually goes wrong

Renewals and billing

Monthly fee plus overage per 1,000 emails (from $1.80 Basic, $1.30 Foundation, $1.10 Scale). Email validations and dedicated IPs ($59/IP/mo) are billed on top.

What Mailgun's docs don't say

We couldn't confirm these from official docs, so don't rely on them either way:

Rotating or replacing a Mailgun key

The steps are the same for most providers: make the new key, deploy it everywhere the old one is used, check it works, then revoke the old one. Our guides walk through it:

Sources

Related providers

Keep track of every Mailgun key

StackHangar stores your Mailgun keys in an encrypted vault, grouped by the product they belong to, warns you before they expire, and walks you through rotating them. We can't read your secrets.