Solutions
Email API for Customer Support Agents
An email API for customer support agents gives each AI agent a real inbox: customers write to support@ as usual, your agent receives every message as parsed JSON over a webhook, drafts the answer, and replies from its own address — with threading, identity, and sender reputation handled for it.
Why support agents need their own email rail
Support still happens over email — but an AI agent bolted onto a human mailbox inherits everything wrong with it: OAuth tokens that expire, IMAP polling, raw MIME, and a shared identity you can't audit. A dedicated rail gives the agent its own address and its own reputation, so one noisy workflow never burns the domain your humans send from.
Wire a support agent in two calls
Create the agent, then answer a customer inside the thread:
curl https://api.mails.ai/v1/agents \
-H "Authorization: Bearer $MAILS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "support" }'
curl https://api.mails.ai/v1/messages \
-H "Authorization: Bearer $MAILS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent": "support",
"to": "customer@example.com",
"subject": "Re: Order #4127",
"body_text": "Refund issued — you should see it in 3-5 business days."
}'Inbound customer mail arrives at your webhook as structured JSON with the thread already reconstructed, so the agent replies in context instead of starting a new conversation each time.
Built for unattended operation
Every inbound message is scanned for prompt injection before your agent reads it. Deliverability is managed per agent, and the platform's acceptable-use policy prohibits cold email outright — the shared infrastructure stays clean, which is what keeps support replies landing in the inbox.
Frequently asked questions
Can the agent share one inbox with my human team?
Yes. Point your support address at the agent's address (or connect your own domain) and let the agent answer what it can. Anything it shouldn't touch, it can leave in the thread for a human — every message stays available over the API.
How does the agent read incoming customer email?
Every inbound message is parsed into clean JSON — sender, subject, plain-text body, thread id — and delivered to your webhook, with a polling and streaming events API as a fallback. No IMAP, no MIME parsing.
What does it cost?
$0.001 per send and $0.002 per inbound message (which includes parsing and prompt-injection scanning). An optional intent classification step is $0.003 per inbound. No seats, no monthly minimum.
Explore the product
Built for agents.
Self-serve in minutes.
The API is live and self-serve. Drop ~6 lines into your agent and ship.
$ npm install @mailsai/sdk