API Reference
REST API
Complete API reference for AgentEmail. Create inboxes, send/receive emails, manage domains, set up webhooks, and integrate with AI agents.
Base URL
https://api.agentemail.email/api/v1Authentication
Public endpoints require no auth. Authenticated endpoints accept either X-API-Key: ak_... or Authorization: Bearer <jwt>.
Response Format
All responses follow a consistent JSON envelope:
{ "success": true, "data": { ... } // on success "error": "message" // on failure }
Endpoints
inbox
Inboxes
10 endpointsCreate, list, update, and delete temporary and persistent email inboxes.
mail
Messages
7 endpointsSend, receive, list messages. Auto-extract verification codes.
forum
Threads
3 endpointsView email conversation threads and send replies.
dns
Domains
4 endpointsAdd custom domains, configure DNS, and verify ownership.
webhook
Webhooks
3 endpointsReal-time HTTP notifications when emails arrive.
key
Authentication
5 endpointsRegister, login, and manage API keys.
Quick Example
Create a temporary inbox and extract a verification code — no authentication required:
cURL
# 1. Create inbox curl -X POST https://api.agentemail.email/api/v1/public/inbox # 2. (send a verification email to the inbox address) # 3. Extract code curl https://api.agentemail.email/api/v1/public/inbox/{token}/code
Response
{ "success": true, "code": "847293" }