Email as an API

Your agent searches, reads, sends, and replies over REST. Your server gets a signed webhook when new mail arrives.

claude  ~/agent
> check my mail for the day
 I'll pull today's inbox from mail-api.
 Bash(curl -s https://api.mail-api/v1/accounts/$ACCOUNT_ID/messages \
         -G -d after=$(date -u +%FT00:00:00Z) \
         -H "Authorization: Bearer $MAIL_API_KEY")
    {"messages":[{"subject":"Re: Your quote","from":[{"address":"ana@acme…
     … +52 lines
 You have 4 new messages today:

  1. Ana Lopez — Re: Your quote. She approved it and asks to start Monday.
  2. Northwind Billing — Invoice #2291 is due Friday.
  3. Team calendar — Standup moved to 10:30.
  4. The Weekly Byte — Newsletter. Nothing to do.

  Ana is waiting on a reply. Want me to draft one?> 

Features

  • API endpoints to manage your email
  • Webhooks to notify for incoming mail

Supported providers

Every provider uses the same endpoints and webhooks.

Provider API value How you connect
Gmail gmail Google consent screen
Yahoo Mail yahoo App password
iCloud Mail icloud App-specific password
AOL Mail aol App password
Fastmail fastmail App password
Zoho Mail, personal and free plans zoho App password
Zoho Mail, paid plans zohopro App password
Namecheap Private Email privateemail Mailbox password

How we handle your mail

  • We fetch message bodies and attachments when your agent asks for them. We do not store them.
  • We encrypt mailbox passwords and Google tokens with AES-256-GCM.
  • We keep a record of each new inbox message for up to 90 days. It holds the subject, addresses, dates, and status. For Gmail, it also holds a short text preview.
  • We do not sell your data, use it for ads, or use it to train AI models.
  • You can disconnect a mailbox at any time. This deletes its stored credentials and message records.

Why we ask for Gmail access

You connect Gmail through Google's consent screen, in a step apart from signing in. We request the gmail.modify permission because your agent needs it to read, send, label, and trash your mail. This permission does not allow permanent deletion.

The use of information received from Google Workspace scopes will adhere to the Google User Data Policy, including the Limited Use requirements.

Read the full privacy policy