M

Mailgun API

by Mailgun Free tier

Mailgun is a developer-focused email service provider with powerful sending, receiving, and validation capabilities. Send transactional and marketing emails at scale, receive inbound email to an HTTP webhook, validate email addresses before sending, parse incoming email messages, and access detailed delivery analytics. Features DKIM/SPF/DMARC auto-setup, email templates, scheduled sending, and click/open tracking. Trusted by 150,000+ businesses.

emailtransactionalbulkvalidationinboundparsinganalytics

Quick Reference

Base URL https://api.mailgun.net/v3 Auth type Basic Auth Auth header Authorization: Basic base64(api:YOUR_API_KEY) Rate limit 100 messages/sec (per domain) Pricing Free tier available Free quota 3-month trial Documentation https://documentation.mailgun.com Endpoint status Server online — HTTP 404 — server is online but path returned an error (may require auth)1.81s (checked Mar 29, 2026) Builder score B 70% builder-friendly
Pricing
90
Latency
30
Depth
86

Authentication

Use HTTP Basic Auth with username "api" and your API key as the password. Your base URL includes your region (api.mailgun.net for US, api.eu.mailgun.net for EU).

Authorization: Basic base64(api:YOUR_API_KEY)

Pricing

Model freemium Starting price Free tier available Free quota 3-month trial
PlanPrice/moIncluded
Trial Free 100 emails/day for 3 months
Foundation $35 50,000 emails/mo
Scale $90 100,000 emails/mo
Custom $0 Enterprise volume

Foundation: $35/mo (50k emails). Scale: $90/mo (100k emails). Custom enterprise pricing available.

Key Endpoints

MethodPathDescription
POST /{domain}/messages Send an email message
GET /{domain}/events Query email delivery events (sent, opened, clicked)
GET /address/validate Validate an email address for deliverability
POST /{domain}/routes Create inbound email routing rules
GET /{domain}/stats/total Get aggregate delivery statistics
GET /{domain}/bounces List bounced email addresses

Sample Request

curl "https://api.mailgun.net/v3/sandboxabc.mailgun.org/messages" \
  -u "api:$MAILGUN_API_KEY" \
  -F from='Sender <mailgun@sandboxabc.mailgun.org>' \
  -F to='user@example.com' \
  -F subject='Hello from Mailgun' \
  -F text='Testing email delivery!'

Sample Response

{
  "id": "<20240315100000.abc123@sandboxabc.mailgun.org>",
  "message": "Queued. Thank you."
}

Data sourced from API Map. Always verify pricing and rate limits against the official Mailgun documentation.