Give your AI agents
real email

A REST API that provisions Google Workspace email, docs, and sheets for AI agents. One API call to create. One API call to send.

Three API calls. That's it.

Create an agent, provision an email, and start sending — all through a simple REST API.

1

Create an agent

Register your AI agent with a name and optional external ID.

curl -X POST https://api.agentmail.dev/v1/agents \
  -H "Authorization: Bearer am_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sales Assistant"}'
2

Provision an email

Give your agent a real Google Workspace email address in seconds.

curl -X POST https://api.agentmail.dev/v1/agents/:id/email \
  -H "Authorization: Bearer am_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"email_prefix": "sales-bot"}'
3

Send & receive email

Use Gmail tools to send, read, list, and search — all via API.

curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gmail_send \
  -H "Authorization: Bearer am_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"to": "customer@example.com",
       "subject": "Follow-up",
       "body": "Hi, just checking in..."}'

Everything your agents need

Full Google Workspace capabilities through a simple, secure REST API.

Gmail Tools

Send, read, list, and search emails. Full Gmail API access through simple tool endpoints.

gmail_send gmail_read gmail_list gmail_search

Google Docs & Sheets

List, read, and search Google Docs and Sheets. Sheets exported as CSV with smart truncation.

gdocs_list gdocs_read gdocs_search

API Key Auth

Secure Bearer token authentication. Keys are SHA-256 hashed — we never store them in plaintext.

Authorization: Bearer am_live_...

Rate Limiting

Built-in per-key rate limiting protects Google API quotas. Clear headers on every response.

X-RateLimit-Remaining Retry-After

Simple, powerful API

Every Google Workspace action is a single POST to a tool endpoint.

# List inbox messages
curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gmail_list \
  -H "Authorization: Bearer am_live_your_key"

# Read a specific email
curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gmail_read \
  -H "Authorization: Bearer am_live_your_key" \
  -d '{"messageId": "18f3a..."}'

# Search emails
curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gmail_search \
  -H "Authorization: Bearer am_live_your_key" \
  -d '{"query": "from:customer@example.com is:unread"}'

# List Google Drive files
curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gdocs_list \
  -H "Authorization: Bearer am_live_your_key"

# Read a Google Sheet as CSV
curl -X POST https://api.agentmail.dev/v1/agents/:id/tools/gdocs_read \
  -H "Authorization: Bearer am_live_your_key" \
  -d '{"fileId": "1BxiMVs...", "row_limit": 100}'

Ready to get started?

Create your account and give your AI agents real email in minutes.