All solutions
Solutions

Email API for Customer Support Agents

Give each AI support agent its own address, read customer replies as structured events, and answer from code.

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. A workspace starts with one agent, hello, and a second one like this needs Pro (5 agents):

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": "hello",
    "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 within your plan’s limits is scanned for prompt injection before your agent reads it. Deliverability is managed per agent: each one has its own reputation score and is suspended automatically if its complaint rate passes 0.3%, so 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?
Free covers 3,000 emails and 3,000 inbound replies a month with no card. Pro is $20/month for 50,000 emails and 50,000 inbound replies, and Scale is $99/month for 250,000 emails and 500,000 inbound replies; parsing and prompt-injection scanning are included on every inbound. Intent classification is opt-in on paid plans at no extra charge. No seats, and yearly billing is two months free.

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