canonical: https://jentic.com/apis/mailersend.com/mailersend

# MailerSend API

MailerSend is a transactional email delivery API designed for product and notification email at scale. The five-endpoint surface in this spec covers single-email send, bulk-email send with status polling, and per-domain or per-activity activity reporting. Authentication is a bearer API token issued from the MailerSend dashboard.

## For AI agents

Send transactional email - single or bulk - and pull per-domain activity reports through five endpoints with bearer-token auth.

## Scope

Does not send SMS, manage marketing campaigns, or run subscriber lists - use for transactional email delivery only.

## Capabilities

- Send a single transactional email through POST /email
- Submit a bulk-email batch through POST /bulk-email and poll status
- Pull per-domain activity (delivered, opened, clicked, bounced) for analytics
- Inspect a specific activity event by id for webhook reconciliation
- Operate against the v1 base URL with bearer token auth

## Use cases

### Transactional Email from a SaaS App

Send signup confirmations, password resets, and notification emails from a product backend by calling POST /email with from, to, subject, and html fields. MailerSend handles MTA queuing, bounce processing, and IP reputation, so the backend only needs to construct the message and submit it. A single call typically returns a queued status within sub-second latency.

Example prompt: POST /email with from=hello@app.com, to=[{"email":"jane@example.com"}], subject="Welcome", and an html body, then verify the response includes a x-message-id header.

### Bulk Notification Batches

Send up to several thousand notifications in a single POST /bulk-email call rather than firing one HTTP request per recipient. The returned bulk_email_id can be polled through GET /bulk-email/{bulkEmailId} to confirm full completion before the orchestrator marks the job done. This is the right pattern for daily digest emails or a one-off blast to a known list.

Example prompt: POST /bulk-email with a JSON array of 100 messages, then poll GET /bulk-email/{bulkEmailId} every 5 seconds until status is completed.

### Activity Reconciliation

Reconcile MailerSend webhook events with the API by calling GET /activity/{domainId} for a domain or GET /activities/{activityId} for a specific event. Use this when an event might have been missed by a webhook listener or to backfill an analytics warehouse with delivered, opened, and clicked counts.

Example prompt: Call /activity/{domainId} for the last 24 hours, filter for events with type=hard_bounced, and write each into a Postgres bounces table.

### Agent-Driven Operational Mail

An AI agent that handles incidents or operational workflows can send a structured email to an on-call rotation through MailerSend via Jentic, then poll activity to confirm delivery before closing the ticket. The bearer token sits in your Jentic One instance, so the agent can be safely granted send rights without exposing credentials.

Example prompt: Send an incident summary email via POST /email to the on-call alias, then poll /activities/{activityId} until status is delivered before resolving the ticket.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /email | Send a transactional email |
| POST | /bulk-email | Submit a bulk-email batch |
| GET | /bulk-email/{bulkEmailId} | Get bulk-email batch status |
| GET | /activity/{domainId} | List activities for a domain |
| GET | /activities/{activityId} | Get a single activity event |

## Key resources

- **Email** — Single transactional email submission
- **Bulk Email** — Bulk email batch submission and status polling
- **Activity** — Per-domain and per-event activity reporting

## Why Jentic

- **Setup:** Wiring the MailerSend API by hand means managing its bearer token, targeting the api.mailersend.com host, and handling its send and activity endpoints yourself. Through Jentic you install once, import MailerSend from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** MailerSend carries the message recipients in the request body for sends, so limit the agent to the operations it needs, such as reading bulk-email status or activity, and add the send operation only when you want it. Every operation the agent can call is one you chose.
- **Credential handling:** Your MailerSend API token 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 'check delivery activity', and Jentic returns the matching MailerSend operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SendGrid Mail Send** — High-volume transactional email API from Twilio.
- **Postmark Server API** — Transactional-only email provider with strong inbox-placement focus.
- **SparkPost** — Transactional and marketing email API with detailed analytics.
- **mailboxlayer** — Real-time email validation to run before submitting to MailerSend.

## FAQ

### What authentication does the MailerSend API use?

MailerSend uses bearer token authentication via the bearerAuth scheme. Generate the token from the MailerSend dashboard and send it in the Authorization header as Bearer {token}. Through Jentic the token is stored encrypted in the vault and injected at execution time.

### Can I send bulk email in one request?

Yes. POST /bulk-email accepts an array of message objects and returns a bulk_email_id you poll via GET /bulk-email/{bulkEmailId} until status is completed. This is the right pattern for daily digests or one-off blasts to a known list.

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

Rate limits depend on your MailerSend plan tier and are published at developers.mailersend.com. The default tier allows several thousand requests per hour. The OpenAPI spec does not encode the per-second cap, so watch for 429 responses and back off.

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

Search Jentic for "send a transactional email" and load POST /email. Execute with from, to, subject, and html fields populated. The response includes a x-message-id header you can correlate with /activities/{activityId}.

### Is the MailerSend API free?

MailerSend includes an API quota on the free plan (currently 3000 emails per month). Higher plans raise the monthly cap and unlock advanced features such as dedicated IPs and a higher bulk-email batch size.

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

Yes. Because you run your own self-hosted Jentic One instance, your own rules decide which MailerSend operations the agent may call. You can grant read-only access to GET /bulk-email/{bulkEmailId}, GET /activity/{domainId}, and GET /activities/{activityId} for status and reporting, and add the sending operations POST /email or POST /bulk-email only when you want the agent to dispatch mail. Every operation the agent can reach is one you chose, and the bearer token is injected at execution time rather than exposed to the agent.
