API Reference
Disposable email inboxes for AI agents and developers. Create temporary addresses, receive messages, and read content — all via REST. No browser required.
https://emptyinbox.me/api
Quick Start
Zero-config with MCP
Add to your MCP config and the server auto-registers on first run — no setup needed:
{
"mcpServers": {
"emptyinbox": {
"command": "npx",
"args": ["-y", "emptyinbox-mcp"]
}
}
}
REST API workflow
- 1Call
POST /auth/registerto get an API key (one-time setup) - 2Call
POST /inboxto create a disposable address - 3Trigger signup or verification using that address
- 4Poll
GET /messagesuntil the email arrives - 5Read the code or link from
text_body
Authentication
API Key
All endpoints except POST /auth/register require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Agents: call POST /auth/register below to get a key programmatically.
Humans: get your key at Settings.
Account
/auth/register
No auth required
Create a new account and get an API key. Agent accounts start with 1 inbox quota. Rate limited to 3 registrations per IP per 24 hours.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
username |
string | Required | 3–32 chars, letters/numbers/hyphens/underscores |
Example Request
curl -X POST "https://emptyinbox.me/api/auth/register" \
-H "Content-Type: application/json" \
-d '{"username": "my-agent"}'
Response
200 OK
{
"api_key": "eiXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"username": "my-agent",
"inbox_quota": 1
}
400 Bad Request — Invalid or taken username
429 Too Many Requests — Rate limit exceeded
/auth/me
Returns the authenticated account's username and remaining inbox quota.
Example Request
curl "https://emptyinbox.me/api/auth/me" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
{
"username": "my-agent",
"inbox_quota": 1
}
Inbox Management
/inbox
Creates a new disposable email inbox. Returns the email address as plain text. Each inbox consumes 1 from your quota. Agent accounts start with 1 inbox; human accounts start with 5. Buy more at emptyinbox.me/inboxes.html.
Example Request
curl -X POST "https://emptyinbox.me/api/inbox" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
201 Created — Returns the email address as plain text
clever.sunny.butterfly@emptyinbox.me
403 Forbidden — Insufficient inbox quota
/inboxes
Returns all inboxes on this account, newest first.
Example Request
curl "https://emptyinbox.me/api/inboxes" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
[
{
"inbox": "clever.sunny.butterfly@emptyinbox.me",
"created_at": "2024-01-01T10:00:00"
},
{
"inbox": "quick.blue.elephant@emptyinbox.me",
"created_at": "2024-01-01T09:00:00"
}
]
Message Management
/messages
Returns all messages across all inboxes, newest first. Messages are automatically deleted after 7 days. Poll this endpoint after triggering a signup or verification flow.
Example Request
curl "https://emptyinbox.me/api/messages" \
-H "Authorization: Bearer YOUR_API_KEY"
Response Fields (per message)
| Field | Type | Description |
|---|---|---|
id | string | Unique message identifier |
inbox | string | Email address that received the message |
subject | string | Email subject line |
sender | string | Sender email address |
timestamp | integer | Unix timestamp |
text_body | string | Plain text body |
html_body | string | HTML body |
Example Response
[
{
"id": "a1b2c3d4",
"inbox": "clever.sunny.butterfly@emptyinbox.me",
"subject": "Confirm your email address",
"sender": "noreply@example.com",
"timestamp": 1711234567,
"text_body": "Your verification code is 482910",
"html_body": "<p>Your verification code is <strong>482910</strong></p>"
}
]
/message/{msgid}
Returns the full content of a specific message including all headers.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
msgid |
string | Required | Message ID from GET /messages |
Example Request
curl "https://emptyinbox.me/api/message/a1b2c3d4" \
-H "Authorization: Bearer YOUR_API_KEY"
Response Fields
| Field | Type | Description |
|---|---|---|
recipients | array | Recipient email addresses |
headers | object | Raw email headers (Subject, From, Date, etc.) |
text_body | string | Plain text body |
html_body | string | HTML body |
sender | string | Sender email address |
Example Response
{
"recipients": ["clever.sunny.butterfly@emptyinbox.me"],
"headers": {
"Subject": "Confirm your email address",
"From": "noreply@example.com",
"Date": "Mon, 1 Jan 2024 10:00:00 +0000"
},
"text_body": "Your verification code is 482910",
"html_body": "<p>Your verification code is <strong>482910</strong></p>",
"sender": "noreply@example.com"
}
404 Not Found — Message not found
Error Codes
| Status | Description | Common Causes |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient inbox quota |
| 404 | Not Found | Message ID doesn't exist |
| 429 | Too Many Requests | Registration rate limit exceeded (3 per IP per 24 hours) |
Limits & Notes
- Agent accounts start with 1 inbox quota; human accounts start with 5
- Creating an inbox consumes 1 quota unit — buy more at emptyinbox.me/inboxes.html
- Messages are automatically deleted after 7 days
- Registration is limited to 3 new accounts per IP per 24 hours
- Full OpenAPI 3.1 spec available at /openapi.yaml