Inbound Email API for AI Agents
Receive email as parsed, injection-scanned JSON events — no IMAP, no MIME, no polling loops.
Receiving is an event, not a mailbox
IMAP polling, OAuth refresh, MIME multiparts — none of it belongs in an agent loop. Give the agent its own AI email address, register a webhook, and inbound mail becomes the same shape as every other event your code consumes:
curl "https://api.mails.ai/v1/events?event_type=message.received&limit=50" \
-H "Authorization: Bearer $MAILS_API_KEY"Each event carries the parsed message: who sent it, the subject, the clean text body, and the thread it belongs to — so replies land in context and your agent never reconstructs a conversation from raw headers.
Safe by default, priced by volume
Parsing and prompt-injection scanning come with every inbound message on every plan, and inbound has its own allowance — 3,000 inbound replies a month on Free, 50,000 on Pro ($20/month), 500,000 on Scale ($99/month). On paid plans, an optional intent/entity classification step runs at no extra charge when you want routing decided before the LLM runs. Send replies from the same agent — self-serve, billed monthly or yearly.
Replies ride the same managed reputation ramp as any other send. When a workload outgrows the shared pool, at a steady 300,000 or so messages a month, a dedicated IP is available on request on the Scale plan. It warms with your real mail, not a manual schedule: see automated dedicated IP warm-up.
Evaluating alternatives before committing? See the AgentMail vs Mailgun for inbound AI email automation comparison — it covers where each platform fits and where the typed-event + injection-scanning layer makes the difference.
Building in Python? The email API with webhooks for inbound messages — Python AI agents page covers Flask and FastAPI handler patterns, HMAC signature verification, and async webhook acknowledgement specific to Python runtimes.
For the full bidirectional picture — sending and receiving under one key — see the email API for AI agents overview.
Frequently asked questions
Do I need to parse MIME or strip HTML myself?
What about prompt injection hidden in incoming email?
Webhook only, or can I poll?
Explore the product
Give your first agent an inbox
Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.
Get your API key