Disposable Email API for AI Agents

A free REST API for creating temporary email addresses on the fly. No API keys, no authentication, no rate limits. Built for AI agents, automated workflows, and integration testing.

Why Agents Need Temporary Email

AI agents and automated workflows frequently need to receive email — verifying sign-ups, confirming actions, or extracting one-time codes. Using a real inbox creates privacy risks and management overhead. ThrowawayMail gives your agent a fresh address that self-destructs after 10 minutes, keeping automated pipelines clean and stateless.

Quick Start

Three steps to receive email programmatically:

1. Create a mailbox

curl -X POST https://throwawaymail.app/api/mailboxes

Returns a JSON object with mailbox_id, address, and expires_at.

2. Poll for messages

curl https://throwawaymail.app/api/mailboxes/{mailbox_id}/messages

Returns an array of message summaries with message_id, subject, and from_address.

3. Read a message

curl https://throwawaymail.app/api/mailboxes/{mailbox_id}/messages/{message_id}

Returns the full message with text, html, and all address fields.

API Endpoints

Method Endpoint Description
POST /api/mailboxes Create a new temporary mailbox
GET /api/mailboxes/{id} Get mailbox details and message list
DELETE /api/mailboxes/{id} Delete a mailbox early
GET /api/mailboxes/{id}/messages List messages in a mailbox
GET /api/mailboxes/{id}/messages/{msg_id} Get full message content
WS /api/ws/{id} Real-time new message notifications

Full interactive docs at /api/docs (Swagger) and /api/redoc (ReDoc).

LLM-Friendly Documentation

ThrowawayMail provides machine-readable documentation designed specifically for AI agents and LLM tool use:

  • /llms.txt — concise API overview for LLM context windows
  • /llms-full.txt — complete API reference with request/response examples
  • /api/openapi.json — OpenAPI 3.1 schema for automatic tool generation

Common Use Cases

  • Automated sign-up verification — create an address, register, extract the confirmation link
  • End-to-end testing — verify your app sends the right emails in CI
  • CI/CD pipelines — disposable addresses for transactional email testing
  • LLM tool use — give your agent a "receive email" capability via function calling
  • Privacy-first automation — no real inbox exposed to third-party services

Key Features

  • No authentication or API keys required
  • JSON responses on every endpoint
  • WebSocket support for real-time message notifications
  • Automatic 10-minute expiry — no cleanup needed
  • OpenAPI schema and interactive docs included
  • Completely free, no usage limits