Every dashboard action is an MCP tool your agent can call.Read the docs

Transactional email API

Send receipts, password resets, and alerts with one API call. Every email returns an ID you can follow to the inbox.

✓Free to start. Unlimited contacts on every tier.

Message trace
Transactional emails

Receipt accepted

Details

delivered

To[email protected]

From[email protected]

Templatewelcome

Sourceapi

ProviderSend & Retain

Delivery events

  1. RequestIdempotency key verified
  2. SafetySuppression cleared
  3. ProviderDelivery accepted
  4. WebhookDelivered
Queued is not delivered

[ 01 / 06 ]Send

How do I send a transactional email from my app?

Keep the key on the server, give each send an idempotency key, and keep the ID that comes back.

A retry with the same idempotency key returns the original email instead of sending twice.

app/api/receipts/route.ts
const response = await fetch("https://sendandretain.com/api/v1/emails", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AEM_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": `receipt-${order.id}`,
  },
  body: JSON.stringify({
    to: order.customerEmail,
    template: "receipt",
    props: { orderId: order.id, total: order.total },
  }),
});

const message = await response.json();

Accepted response

{ "id": "msg_…", "status": "queued" }

[ 02 / 06 ]Before the first send

What do I need before I send?

Three things. Your agent can do the first two for you.

  1. Verify your domain

    Create the domain and add the DNS records you're given (DKIM, a mail-from subdomain, and a tracking record). Sends from an unverified domain are refused.

  2. Publish a template

    Write it in react.email, render it, send yourself a test, then publish. Published versions never change.

  3. Create an API key

    In Settings → API & MCP, create a "Send + manage" key for your server. It's shown once, so store it as an environment variable.

    .env
    AEM_KEY=aem_...

[ 03 / 06 ]Use cases

What counts as a transactional email?

Email someone needs because of something they did. It still sends after they unsubscribe from marketing.

Receipts and invoices

Sent the moment an order or payment goes through.

Password resets and sign-in links

Time-sensitive email that has to land first time.

Account alerts

Security notices, usage warnings, and failed payments.

Order and shipping updates

Confirmations and tracking, on the same contact record as your marketing email.

[ 04 / 06 ]Send path

What happens between the API call and the inbox?

Your setup is checked straight away. Everything about the recipient is checked again right before the email sends.

  • An unknown template, unverified sender, or revoked key fails inline with a 4xx.
  • The same idempotency key never sends twice.
  • Suppressions, address verification, the pause switch, and the daily cap run right before it sends.
  • The returned ID links your request to every delivery event, and signed webhooks push them to you.
Message trace
Transactional emails

Receipt accepted

Details

delivered

To[email protected]

From[email protected]

Templatewelcome

Sourceapi

ProviderSend & Retain

Delivery events

  1. RequestIdempotency key verified
  2. SafetySuppression cleared
  3. ProviderDelivery accepted
  4. WebhookDelivered
Queued is not delivered

[ 05 / 06 ]One system

Do I need a separate tool for marketing email?

No. Your receipts and your marketing automations share one contact record here.

Marketing automations

Sending-only email API

A second tool, synced by hand

Send & Retain

Built in, on the same contacts

Unsubscribes

Sending-only email API

You build the page and the list

Send & Retain

Hosted unsubscribe page and one-click headers

Bounces and complaints

Sending-only email API

You read webhooks and suppress yourself

Send & Retain

Suppressed automatically

Your own provider

Sending-only email API

Locked to one vendor

Send & Retain

Our infrastructure, or your own Resend or SendGrid key

Questions people ask us

Send your first transactional email today.

Verify a domain, publish a template, and send one with an idempotency key.