Choosing an email API for an agent
Four questions decide this, and none of them is the one everybody asks. Answer them in order and you'll know which product you need — quite possibly not ours.
Why deliverability isn't the axis
Resend, Postmark, Mailgun and SendGrid have spent years on inbox placement, and they're good at it. So is anyone building on top of the same underlying infrastructure, which — once you look — is most of the category. Comparing them on deliverability is comparing airlines on whether the plane lands.
What actually separates them, for an agent specifically, is architectural: the shape mail arrives in, who is allowed to create an account, how long anything is kept, and whose reputation you're borrowing. Those four decisions are hard to reverse once you've built around them, which is why they're worth ten minutes now.
The four questions
In order. The first one eliminates the most options.
Does the agent need to look backwards?
If a message arrives, gets acted on and is never needed again — a verification code, a one-shot notification — a webhook is fine and you have the whole market to choose from. If the agent needs the thread, needs to check what was said last week, or needs to resume a conversation after a restart, you want a mailbox: something it can list, read and re-read on demand.
Webhook is enough → any transactional provider, or Cloudflare if you're on Workers. You need a mailbox → Mailgi or AgentMail. The difference isn't capability, it's who does the storing. A webhook alone means you run a public HTTPS endpoint, handle retries and duplicates, and build the persistence yourself. That's a weekend you may not have budgeted.
Worth knowing the two aren't exclusive: a mailbox product can also push. Mailgi does both — the notification tells you mail arrived, and the message is still sitting in a mailbox you can re-read, so a dropped or mishandled webhook costs you latency rather than data. That is the combination to look for if you need both promptness and history.
Who is allowed to create the account?
This is the question people discover last and should ask first. If a human can sit down once, sign up, generate a key and paste it into a config, every product in the category works and you should pick on price and polish.
If the program has to obtain its own credentials — because you're spawning agents dynamically, running unattended, or building something where a human in the loop defeats the purpose — the field collapses to almost nothing. Resend, Postmark, Mailgun and SendGrid all require a browser signup. AgentMail has a sign-up API but sends a six-digit code to a human address and won't send anywhere else until someone reads it. Genuinely unattended → Mailgi, or PhoboMail if MCP-only and no custom domain suits you.
How long does the mail need to live?
Retention is quietly one of the biggest differences here and it's rarely on the comparison table. Some providers keep received mail for 30 days on standard plans. For a workflow that's irrelevant. For an agent that's supposed to remember a customer relationship, it's a silent data-loss bug that surfaces months after launch.
Decide the number before you pick the product, and check it — it's usually in the quotas page rather than the pricing page. If you need indefinite history, either pick something that keeps it or plan to copy every message into your own store on arrival.
Whose domain, and whose reputation?
A shared platform domain gets you working in seconds and is right for prototypes, internal tools and catching verification codes. Your own domain is right the moment an agent writes to a customer — partly because people trust a company address, and mostly because on a shared domain your deliverability depends on the behaviour of every other agent on the platform.
If you're going to need your own domain eventually, check what that costs before you start: on some products a custom domain is a paid tier, on others it's free but requires DNS work you should scope now rather than discover during a launch.
Where that lands you
The four common destinations, stated plainly.
Mostly sending, human sets it up
Resend or Postmark. Mature, excellent delivery, better value than us at low volume. Don't overthink it.
Already on Cloudflare Workers
Cloudflare Email Service. Receiving is free, sending is the cheapest here. You build the mailbox — on good primitives.
Multi-tenant platform, needs depth
AgentMail. Threading, search, IMAP, SOC 2 — more mature than we are, if a one-time human signup is acceptable.
The program registers itself
Mailgi. One POST, no human at any point, shared or your own domain on the same API. This is the case we exist for.
Questions, answered
01What should you look for in an email API for an AI agent?
Not deliverability — the established transactional providers are all good at it and it rarely separates them. Four things decide an agent build instead. Whether inbound arrives as a mailbox the agent can read and re-read, or as a webhook you must catch and store yourself. Whether a program can obtain credentials without a human completing a signup or reading a code. How long received mail is retained, because an agent that can't recall an earlier message can't hold a conversation. And whether you send from a shared platform domain or your own, which determines whose sending reputation you depend on.
02Is a webhook good enough for receiving an agent's email?
It depends on whether the agent ever needs to look backwards. A webhook is a push of one message to an endpoint you host — so you must run a public HTTPS service, handle retries and duplicates, and store the message yourself if it'll be needed again. Fine for a one-shot trigger like a verification code. Wrong shape for a support agent that needs the whole thread, because you end up rebuilding a mailbox around the webhook.
03Do AI agents need their own email domain?
Not to start. A shared platform domain gets an agent working in seconds and is appropriate for prototypes, internal tooling and receiving verification codes. Move to your own domain before an agent writes to customers, for two reasons: recipients trust a company address more than an unfamiliar shared one, and on your own domain your sending reputation is yours alone rather than shared with every other agent on the platform.
04Should each AI agent have its own email address or share one?
Its own, in almost every case. Separate addresses give a per-agent audit trail, a credential you can revoke in isolation, and inboxes that need no filtering. The usual objection is cost, which doesn't apply where registration is free and unlimited. Share an address only when several workers genuinely act as one identity — a support queue — and expect to coordinate them yourself.
05Do I need webhooks for an agent email API?
Only if latency below about a minute matters. Webhooks push a message to an endpoint you host — a public HTTPS service, signature verification, retries and duplicates. Polling needs none of that and is usually adequate: a few seconds for a verification code, a minute for a support queue. Webhooks earn their complexity for real-time conversation, not background work.
06What should I check before committing to an email API for agents?
Six things, in order: whether inbound is a mailbox or a webhook; whether a program can get credentials without a human; how long mail is retained; whether a custom domain is included or a paid tier; whether attachments work in the direction you need; and the real sending limits, including any ramp on a newly verified domain — several providers quote a headline number well above what a new domain may send on day one.
Want the actual numbers?
Free tiers, paid entry points, retention and inbound support for every product named here — checked against each vendor's own pages and dated.