canonical: https://jentic.com/apis/mandrillapp.com/mandrill

# Mandrillapp Mandrill

Mandrill is Mailchimp's transactional email service for sending data-driven, one-to-one messages such as receipts, password resets, and order confirmations. The API is a long-standing JSON-over-POST surface organised by resource group - messages, templates, users, webhooks, inbound, exports, subaccounts, tags, urls, ips, metadata, rejects, whitelists, and senders - with the API key sent in the request body of every call. It supports template-driven sends with merge variables, click and open tracking, scheduled delivery, suppression management, and inbound email routing.

## For AI agents

Send transactional emails through Mailchimp's Mandrill - including templated sends, scheduling, suppression management, and inbound routing - over a JSON POST API.

## Scope

Does not handle SMS, push notifications, or marketing campaign sends - use for transactional email delivery, templates, and inbound parsing only.

## Capabilities

- Send a transactional email with HTML, text, attachments, and merge variables
- Render and send messages from a stored Mandrill template by template name
- Schedule a message for later delivery and reschedule or cancel it before send
- Manage suppression lists by adding, listing, or removing rejects and allowlists
- Configure inbound domains and routes to receive parsed email at an HTTPS endpoint
- Pull message activity, opens, and clicks for a given send to feed downstream analytics

## Use cases

### Transactional email for SaaS notifications

Product teams need reliable delivery for password resets, signup confirmations, and billing receipts. Mandrill's POST /messages/send.json and POST /messages/send-template.json endpoints accept the recipient, subject, and either raw HTML or a stored template name with merge variables, returning a per-recipient send status. The result is a per-message delivery record that can be checked later via the search and content endpoints.

Example prompt: Send the 'password-reset' template to user@example.com with a reset_url merge variable and confirm the send was queued.

### Suppression list maintenance

Teams running long-lived transactional senders need to keep bounces and complaints out of future sends to protect deliverability. POST /rejects/list.json returns the current suppression list, /rejects/add.json adds an address, and /rejects/delete.json removes one. Wiring these into a churn or refund flow keeps the sender reputation clean.

Example prompt: Add hardbounce@example.com to the Mandrill rejects list with reason 'invalid' and verify it appears in the next list call.

### Inbound email parsing for support workflows

Support tools often need to accept inbound email replies, parse them, and create or update tickets. Mandrill's inbound endpoints - POST /inbound/add-domain.json and POST /inbound/add-route.json - register a domain and forward parsed messages as JSON to an HTTPS endpoint. The application receives the parsed body, headers, and attachments, with no MX or MIME parsing on its side.

Example prompt: Register the inbound domain reply.example.com in Mandrill and add a route forwarding all messages to https://app.example.com/inbound.

### Agent-driven transactional email

An AI agent acting on a user's behalf - confirming a booking, sending a follow-up - needs to dispatch email without holding the Mandrill API key in its context. Through Jentic the agent searches by intent, loads the messages send schema, and executes with a scoped credential. The send is logged on Mandrill with the agent's audit metadata attached.

Example prompt: Given a booking record, send a confirmation email from the 'booking-confirmed' template to the customer and store the returned message id.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /messages/send.json | Send a transactional message |
| POST | /messages/send-template.json | Send a message rendered from a stored template |
| POST | /messages/search.json | Search past messages by tag, sender, or recipient |
| POST | /templates/list.json | List stored templates |
| POST | /rejects/list.json | List suppressed addresses |
| POST | /rejects/add.json | Add an address to the rejects list |
| POST | /inbound/add-route.json | Add an inbound parse route |
| POST | /webhooks/add.json | Register a webhook for delivery events |

## Key resources

- **Messages** — Send, search, and inspect individual transactional messages
- **Templates** — Manage stored templates with merge variables for templated sends
- **Webhooks** — Configure outbound webhooks for opens, clicks, bounces, and complaints
- **Inbound** — Register inbound domains and routes to receive parsed email
- **Rejects** — Maintain the suppression list of bounced and complained addresses
- **Subaccounts** — Manage isolated sending streams within a single Mandrill account

## Why Jentic

- **Setup:** Wiring Mandrill by hand means putting your API key into every JSON request body, learning the /messages, /templates, and /webhooks endpoints, and handling rejects yourself. Through Jentic you install once, import Mandrill from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Mandrill carries its target in the request body rather than the URL path, so scoping is by operation: you limit the agent to the operations it needs, such as sending a transactional email or searching sent messages, and leave out ones like adding rejects or webhook routes. Every operation you allow is one you have chosen, so the agent stays inside that set.
- **Credential handling:** Your Mandrill API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a transactional email' or 'list email templates', and Jentic returns the matching Mandrill operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SendGrid Email Activity** — Twilio's transactional email service with broader infrastructure tooling.
- **Postmark** — Transactional-only email service with a strong focus on inbox placement.
- **Resend** — Modern transactional email API focused on developer experience.
- **Mailchimp Marketing** — Marketing email and audience management - the marketing-side counterpart to Mandrill's transactional surface.

## FAQ

### What authentication does the Mandrill API use?

Mandrill uses an API key passed inside the JSON request body as the 'key' field on every call, rather than a header. Through Jentic, the API key is stored encrypted in the vault and injected into the request body at execution time, so the raw key never appears in the agent's prompt or transcript.

### Can I send a templated email through the Mandrill API?

Yes. POST /messages/send-template.json takes a template_name plus an array of merge variables and recipient overrides, renders the stored template, and queues the send. Use POST /templates/list.json to discover the available template names in the account.

### What are the rate limits for the Mandrill API?

Mandrill applies an hourly send quota that varies by account reputation rather than a fixed per-second limit. The /users/info.json call returns the current hourly_quota, sent, and reputation values, which is the documented way to check headroom before a large batch send.

### How do I send a transactional email through Jentic?

Run pip install jentic, then search Jentic for 'send a transactional email through mandrill'. Jentic returns the POST /messages/send.json operation, you load its schema, and execute with the to, from_email, subject, and html fields to dispatch the message.

### Does Mandrill support inbound email through this API?

Yes. POST /inbound/add-domain.json registers an inbound domain (after MX records point at Mandrill), and POST /inbound/add-route.json maps a pattern on that domain to an HTTPS endpoint. Mandrill posts the parsed message JSON to that endpoint when mail arrives.

### Is the Mandrill API free?

Mandrill is a paid add-on to a Mailchimp account, billed per block of emails. There is no free tier on the transactional API itself; the cost-per-block is published on the Mailchimp transactional pricing page and is independent of the Mailchimp marketing plan.

### Can I limit what my agent is allowed to do with the Mandrill API?

Yes. Because Jentic One is self-hosted, your own rules decide which Mandrill operations and credentials the agent may use, and Mandrill scopes by operation since it carries its target in the request body rather than the URL path. You can allow only the operations the agent needs, such as POST /messages/send.json to send a transactional email or POST /messages/search.json to look up past sends, while leaving out POST /rejects/add.json or POST /inbound/add-route.json. Every operation the agent can call is one you have chosen, so it stays inside that set.
