For Agents
Send a transactional email via Mailgun and retrieve the stored message by its ID using HTTP Basic authentication with a private API key.
Get started with Mailgun API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"send a transactional email"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Mailgun API API.
Send a transactional email through POST /{domain}/messages
Retrieve a stored message by ID via GET /{domain}/messages/{messageId}
Address messages to multiple recipients in a single send
Attach files and inline images to outbound messages
Authenticate every call with HTTP Basic and the Mailgun private API key
GET STARTED
Use for: I need to send a transactional email through Mailgun, Send an order confirmation email to a customer, Retrieve a previously sent message by its messageId, Send a verification email with an HTML body
Not supported: Does not handle SMS, push notifications, or voice calls — use for transactional email delivery and stored-message retrieval only.
The Mailgun API is a transactional email delivery service that lets developers send messages and retrieve delivery details through a simple REST interface. This Jentic-curated specification exposes the two core operations: POST /{domain}/messages to send an email and GET /{domain}/messages/{messageId} to fetch a stored message by ID. Authentication uses HTTP Basic with the Mailgun private API key as the password. The API is suited to teams sending application-generated email such as receipts, notifications, and verification messages from a verified sending domain.
Patterns agents use Mailgun API API for, with concrete tasks.
★ Transactional Email Delivery
Send transactional emails such as receipts, password resets, and account notifications by posting to /{domain}/messages with from, to, subject, and body fields. Mailgun handles routing, retries, and delivery tracking on the configured sending domain. Integrating the single send endpoint typically takes under an hour.
POST /{domain}/messages with from='noreply@example.com', to='user@example.com', subject='Receipt', and an HTML body, then capture the returned message id.
Message Retrieval and Audit
Fetch a stored email by its message ID via GET /{domain}/messages/{messageId} to support audit logs, customer support lookups, and content review. The endpoint returns the original message body and headers so an agent or support tool can reproduce what was sent without storing the content separately.
GET /{domain}/messages/{messageId} for a known message id and parse the response body to confirm the recipient and subject line.
AI Agent Notifications via Jentic
An AI agent calls Mailgun through Jentic to dispatch transactional notifications (alerts, summaries, status updates) on behalf of users. The agent searches Jentic for 'send an email', loads the schema for POST /{domain}/messages, and executes the call while Jentic injects the Mailgun Basic auth credential.
Search Jentic for 'send a transactional email', load the Mailgun POST messages operation, and execute it to notify a user that a long-running task has finished.
2 endpoints — the mailgun api is a transactional email delivery service that lets developers send messages and retrieve delivery details through a simple rest interface.
METHOD
PATH
DESCRIPTION
/{domain}/messages
Send an email message
/{domain}/messages/{messageId}
Get message details by ID
/{domain}/messages
Send an email message
/{domain}/messages/{messageId}
Get message details by ID
Three things that make agents converge on Jentic-routed access.
Credential isolation
The Mailgun private API key is stored encrypted in the Jentic vault. The agent receives a scoped reference, and Jentic constructs the Basic auth header at execution time so the secret never enters the agent's context window or logs.
Intent-based discovery
Agents search Jentic with intents like 'send a transactional email' and receive the Mailgun POST /{domain}/messages operation with its parameter schema, ready to execute against the verified sending domain.
Time to first call
Direct integration: a few hours for auth, retries, and bounce handling. Through Jentic: under 15 minutes from search to first delivered message.
Alternatives and complements available in the Jentic catalogue.
SendGrid
Transactional and marketing email delivery with templates and analytics
Choose SendGrid when you need built-in template management, marketing campaigns, or richer event webhooks.
Brevo
Transactional email plus SMS and CRM in one platform
Pick Brevo if the agent also needs SMS sending or contact management alongside email.
Twilio
SMS, voice, and messaging APIs
Use Twilio alongside Mailgun when the agent needs to fall back from email to SMS for high-priority notifications.
Specific to using Mailgun API API through Jentic.
What authentication does the Mailgun API use?
Mailgun uses HTTP Basic authentication. You pass the literal string 'api' as the username and your Mailgun private API key as the password. Through Jentic, the key is stored encrypted in the vault and applied at execution time so the agent runtime never holds it.
Can I send a transactional email with the Mailgun API?
Yes. POST /{domain}/messages accepts from, to, subject, and text or html body fields and queues the message for delivery from your verified sending domain. The response contains the Mailgun message id you can store for later retrieval.
What are the rate limits for the Mailgun API?
Limits depend on your Mailgun plan and the reputation of your sending domain rather than a single per-second cap declared in the spec. Apply exponential backoff on 429 responses and respect the per-domain hourly limits visible in the Mailgun control panel.
How do I send an email with the Mailgun API through Jentic?
Run pip install jentic and search for 'send a transactional email'. Jentic returns the Mailgun POST /{domain}/messages operation with its parameter schema. Execute it with from, to, subject, and body; Jentic injects the Basic auth credential automatically.
Can I retrieve a previously sent message?
Yes. GET /{domain}/messages/{messageId} fetches the stored message body and headers for a given Mailgun message id. This supports audit, replay, and customer support flows without keeping a separate copy of the email content.
Does the Mailgun API support multiple recipients?
Yes. POST /{domain}/messages accepts a comma-separated list in the to field and supports cc and bcc. For larger sends, batch through Mailgun recipient variables to keep each request within Mailgun's recipient limits.