# MailWarren API reference > MailWarren is an email sandbox for developers. Apps send email to it (over SMTP or HTTP) and it is captured instead of delivered; tests and AI agents then read that email back through an API — with verification codes and links already extracted. It can also deliver real transactional email from a verified domain. This document is the complete, plain-text API reference, written so an AI agent or a developer can use MailWarren without anything else. Machine-readable OpenAPI 3.1 spec: https://www.mailwarren.io/openapi.json. Human docs: https://www.mailwarren.io/docs. ## Quick facts - API base URL: `https://api.mailwarren.io/gateway/5d1da8dd-9504-4297-9bd3-8dfc3fc90faf/Prod/mailwarren/v1` — every path below is relative to it. - Authentication: `Authorization: Bearer `. Keys are created by a signed-in user in the web app (https://www.mailwarren.io); no API creates keys. If you are an agent without a key, ask your user for one. - Requests and responses are JSON (UTF-8). Field names in request bodies for `/send` and `/sandbox/send` are PascalCase (`From`, `To`, …); responses are camelCase. - Times are UTC ISO-8601. - MCP server for AI agents: `https://api.mailwarren.io/gateway/5d1da8dd-9504-4297-9bd3-8dfc3fc90faf/Prod/mailwarren/v1/mcp` (streamable HTTP, bearer key). ## Keys | Key | Prefix | Can do | Created in the web app at | |---|---|---|---| | Send key | `mw_live_` | `POST /send` — deliver real email from one verified domain | Sending Domains | | Mailbox key | `mw_sandbox_` | One mailbox: capture into it (`POST /sandbox/send`), read it (`/inbox/*`), MCP | A mailbox's page inside a Warren → Sandbox API keys | | Account key | `mw_mcp_` | Read every mailbox the account (or organisation) owns (`/inbox/*`), MCP | Account → MCP keys (organisation Owners/Admins) | A key only ever sees its own owner's mail; anything else is "not found" (404), never 403. Prefer a mailbox key when one mailbox is enough; keep account keys out of client-side code and logs. ## Concepts - **Warren**: a project. It holds mailboxes. - **Mailbox**: a capture inbox with its own SMTP credentials and mailbox keys. Point an app's SMTP settings at it and everything the app sends lands there. - **Captured message**: an email in a mailbox. Captures count against the plan's monthly capture allowance and are kept for the plan's retention period. ## Typical flows **Test that your app sends the right email (CI or agent):** 1. Your app sends via SMTP to a MailWarren mailbox (or you call `POST /sandbox/send`). 2. Note the time (or `DELETE /inbox/messages` to clear the mailbox first). 3. Trigger the action (sign up, reset password, order). 4. `GET /inbox/wait?to=
&since=