Email API for AI Agents
AgentEmail provides temporary and persistent email inboxes for AI agents. Create inboxes via API, receive emails, extract verification codes, and integrate with Claude MCP.
curl -X POST https://api.agentemail.email/api/v1/public/inboxResponse
{ "address": "abc123@agentemail.email", "token": "temp_xyz..." }
How It Works
Three steps to give your AI agent its own email address.
Create Inbox
Call the API to create a temporary or persistent inbox. No registration needed for temporary inboxes.
Receive Email
Emails arrive at your inbox address. Poll for new messages or set up webhooks for real-time delivery.
Extract Data
Auto-extract verification codes, parse email content, or forward messages to your agent for processing.
Getting Started
The essentials for your first deployment.
Create Temporary Inbox
Create anonymous temporary inboxes without registration. Perfect for testing and one-time verifications.
MCP Integration
Connect AgentEmail to Claude via Model Context Protocol for seamless email operations.
Extract Verification Codes
Automatically extract verification codes from emails using the /code endpoint. Perfect for automated testing and agent workflows.
View API Docs arrow_forwardcurl https://api.agentemail.email/api/v1/public/inbox/:token/codeResponse
{ "code": "847293", "text": "Your code is 847293" }
Core Features
Temporary Inboxes
Create anonymous temporary email addresses without registration. Inboxes auto-expire after 60 minutes. No API key required.
Persistent Inboxes
Register an account and create permanent inboxes with custom addresses. Full CRUD operations with API key authentication.
REST API
Full REST API for creating inboxes, sending/receiving emails, managing threads, custom domains, and webhooks.
MCP Server
Model Context Protocol integration allows Claude and other AI agents to use email as a native tool. Supports both stdio and HTTP SSE transport.
CLI Tool
Command-line interface for managing inboxes, reading messages, and extracting verification codes directly from your terminal.
API at a Glance
All endpoints are under https://api.agentemail.email/api/v1
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /public/inbox | Create temporary inbox | None |
| GET | /public/inbox/:token | Get inbox & messages | None |
| GET | /public/inbox/:token/code | Extract verification code | None |
| POST | /inboxes | Create persistent inbox | API Key |
| GET | /inboxes/:id/messages | List messages | API Key |
| POST | /inboxes/:id/messages | Send email | API Key |
| GET | /inboxes/:id/messages/code | Extract verification code | API Key |
| GET | /inboxes/:id/threads | List email threads | API Key |
| POST | /inboxes/:id/threads/:tid/reply | Reply to thread | API Key |
| POST | /webhooks | Create webhook | API Key |
| POST | /domains | Add custom domain | API Key |
Authentication
AgentEmail supports two authentication methods depending on your use case.
No Auth — Public Endpoints
Temporary inboxes require no authentication. Create, read, and delete using only the inbox token.
curl -X POST /api/v1/public/inboxAPI Key — Authenticated Endpoints
Persistent inboxes, sending, domains, and webhooks require an API key passed via header.
curl -H "X-API-Key: ak_..." /api/v1/inboxes
Integration Options
Choose the integration method that fits your workflow.