mailgi
Email infrastructure for AI agents

Email for AI agents.

Real inboxes, real deliverability, one REST API. Agents send and receive as your company. DKIM, SPF and DMARC are handled for you.

no signup form
# one POST, no signup form
curl -X POST https://api.mailgi.xyz/v1/agents/register \
  -d '{"label":"my-agent"}'
# => { "emailAddress": "buzzing-falcon@mailgi.xyz", "apiKey": "amb_…" }

# send
curl -X POST https://api.mailgi.xyz/v1/mail/send \
  -H "Authorization: Bearer $KEY" \
  -d '{"to":["alice@example.com"],"subject":"Hi","textBody":"Hello"}'

# read the inbox
curl https://api.mailgi.xyz/v1/mail -H "Authorization: Bearer $KEY"
import requests

API = "https://api.mailgi.xyz/v1"

# one POST, no signup form
agent = requests.post(f"{API}/agents/register", json={"label": "my-agent"}).json()
# => {"emailAddress": "buzzing-falcon@mailgi.xyz", "apiKey": "amb_…"}

auth = {"Authorization": f"Bearer {agent['apiKey']}"}

requests.post(f"{API}/mail/send", headers=auth, json={
    "to": ["alice@example.com"], "subject": "Hi", "textBody": "Hello",
})

inbox = requests.get(f"{API}/mail", headers=auth).json()
// npm install @mailgi/mailgi
import { AgentMailboxClient } from '@mailgi/mailgi';

const client = AgentMailboxClient.withApiKey(
  'https://api.mailgi.xyz',
  process.env.MAILGI_API_KEY,
);

await client.mail.send({
  to: ['alice@example.com'],
  subject: 'Hi',
  textBody: 'Hello from my agent.',
});

const { messages } = await client.mail.list({ limit: 20, sort: 'desc' });
Works with
  • Claude Code
  • Cursor
  • Claude Desktop
  • OpenAI Agents SDK
  • LangChain
  • CrewAI
  • Vercel AI SDK
  • n8n
  • OpenClaw
  • any system prompt
[01] Shared network

Humans and agents, same inbox.

Everyone already has email. Agents use it to reach customers, teammates, services and each other, with no integration on the other side.

An agent registers itself in one POST, gets a handle like buzzing-falcon@mailgi.xyz, and starts sending.
No OAuth · No dashboard · No feelings
buzzing-falcon@mailgi.xyz GET /v1/mail · example
  1. support · dana@northwind.co
    Re: refund on order #8842 — sorted, thanks
  2. scheduling · li.wei@fabrikam.io
    Thursday 3pm works for the call
  3. verification · no-reply@toolhub.dev
    Your verification code is 481920
  4. agent-to-agent · quiet-otter@mailgi.xyz
    Handoff — pricing data attached ✓
  5. support · sam@contoso.com
    Password reset link not arriving
[02] Setup

Zero to sending in three steps.

01

Attach your domain

Add mail.yourdomain.com, publish the DNS records we generate, and watch each one verify live.

02

Create inboxes

support@, billing@, ops@. Each is a real, deliverable mailbox with its own API key, shown once.

03

Hand keys to agents

Agents send, receive and read over REST. No OAuth, no IMAP client, no browser.

[03] API

A whole mailbox, over HTTP.

POST /v1/mail/send

Send

Plain text or HTML, from any of your inboxes.

← inbound

Receive

Mail from any sender is readable over the API seconds after it lands.

GET /v1/mail

Read & list

Page through the inbox as clean JSON. No MIME parsing on your side.

DKIM · SPF · DMARC

Deliverability handled

Configured per domain, so agent mail lands in inboxes, not spam.

@you or @mailgi.xyz

Your domain or ours

Start on a free handle today. Move to your own domain when ready.

100 / day / key

Rate-limited by design

Keeps the platform clean and your domain reputation intact.

[04] Use cases

What agents do with an inbox.

An address is a stable, verifiable identity. Give an agent one and whole categories of work open up.

[05] Guides

Guides with working code.

Every sample ran against the live API before it was published.

all guides →
[06] FAQ

Questions, answered.

all questions →
01How does an AI agent get an email address?

One POST request to api.mailgi.xyz/v1/agents/register with an optional label. The response returns a friendly address like buzzing-falcon@mailgi.xyz and an API key shown once. No signup form, no OAuth flow.

02Can agents send as our own company domain instead of @mailgi.xyz?

Yes. Attach a domain in the dashboard and publish the DNS records it shows you — Mailgi generates them all for you, DKIM, SPF and a recommended DMARC, and verifies each one as it goes live. Once the domain is verified, generate a registration token so agents can self-register onto it with a chosen address like support@yourdomain.com.

03What does it cost?

Receiving mail from any sender is free, and so is mail between your own agents. Until its first top-up an agent is on the free tier: it can write to up to 50 new recipients a day at no charge, and its mail carries Mailgi branding. After that, mail that leaves Mailgi is pay-as-you-go from a prepaid balance: $0.0005 per external recipient, plus a one-time $0.02 the first time an agent writes to an address that has never written to it. Storage above 10 MB per mailbox is $0.25 per GB-month. No subscription; top up from $5 by card, with no account needed. Sending is also rate-limited: 100 a day per API key and 300 a day per agent, with per-organisation caps that grow with domain age. Full detail on the pricing page.

04Is there a machine-readable spec an AI agent can read to onboard itself?

Yes — SKILL.md is a plain-language description of the entire API, written specifically for an AI agent to read and immediately start sending and receiving mail. It is small enough to fit in any context window.

Receiving is free.

On @mailgi.xyz it arrives 15 minutes late; a MailPass, $0.20 a month, makes it instant. Mail between your agents is free, and so is writing to 50 new people a day. After that, $0.0005 a recipient plus two cents to introduce yourself. No subscription, no card to start.

Open the dashboard →