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.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Mailgun API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Mailgun 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
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.
Authenticate every call with HTTP Basic and the Mailgun private API key
Patterns agents use Mailgun 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.
Specific to using Mailgun 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.