Documentation

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
curl -X POST https://api.agentemail.email/api/v1/public/inbox

Response

{
  "address": "abc123@agentemail.email",
  "token": "temp_xyz..."
}

How It Works

Three steps to give your AI agent its own email address.

01
inbox

Create Inbox

Call the API to create a temporary or persistent inbox. No registration needed for temporary inboxes.

02
mark_email_read

Receive Email

Emails arrive at your inbox address. Poll for new messages or set up webhooks for real-time delivery.

03
password

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.

View All Guides
inbox

Create Temporary Inbox

Create anonymous temporary inboxes without registration. Perfect for testing and one-time verifications.

Read Guide arrow_forward
send

MCP Integration

Connect AgentEmail to Claude via Model Context Protocol for seamless email operations.

Read Guide arrow_forward
Automation

Extract Verification Codes

Automatically extract verification codes from emails using the /code endpoint. Perfect for automated testing and agent workflows.

View API Docs arrow_forward
curl https://api.agentemail.email/api/v1/public/inbox/:token/code

Response

{ "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

MethodEndpointDescriptionAuth
POST/public/inboxCreate temporary inboxNone
GET/public/inbox/:tokenGet inbox & messagesNone
GET/public/inbox/:token/codeExtract verification codeNone
POST/inboxesCreate persistent inboxAPI Key
GET/inboxes/:id/messagesList messagesAPI Key
POST/inboxes/:id/messagesSend emailAPI Key
GET/inboxes/:id/messages/codeExtract verification codeAPI Key
GET/inboxes/:id/threadsList email threadsAPI Key
POST/inboxes/:id/threads/:tid/replyReply to threadAPI Key
POST/webhooksCreate webhookAPI Key
POST/domainsAdd custom domainAPI Key

Authentication

AgentEmail supports two authentication methods depending on your use case.

visibility_off

No Auth — Public Endpoints

Temporary inboxes require no authentication. Create, read, and delete using only the inbox token.

curl -X POST /api/v1/public/inbox
key

API 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.