# OTPlane

> Free temporary (disposable) email with real-time inbox, automatic OTP detection, reserved private addresses, a REST API and an MCP server for AI agents.

OTPlane lets anyone create a temp email address instantly (no sign-up) to receive verification emails and one-time passwords. Temp mail is deleted after 7 days. Members can reserve addresses (mail kept 60 days), share mailboxes, get browser/Telegram/extension alerts and bring their own domains.

## Pages
- [Home](https://otplane.com/): temp mail generator and inbox
- [Tiếng Việt](https://otplane.com/vi): email tạm miễn phí, nhận OTP
- [Temp mail API & MCP](https://otplane.com/temp-mail-api): automation for developers and AI agents
- [API documentation](https://otplane.com/docs)
- [Pricing](https://otplane.com/pricing)
- [Own domain](https://otplane.com/own-domain)
- [Browser extension](https://otplane.com/extension)

## For AI agents
- [Full Markdown reference](https://otplane.com/llms-full.txt): API endpoints, MCP tools, examples
- MCP server (Streamable HTTP): https://otplane.com/mcp — `claude mcp add --transport http otplane https://otplane.com/mcp`
- REST base URL: https://otplane.com/api/v1 (Bearer token from https://otplane.com/#/me/api)

## Authentication
Create a personal token on https://otplane.com/#/me/api. Send it as `Authorization: Bearer otpl_…`. Scopes: default = your reserved + shared mailboxes; `temp` = unreserved temp addresses; `delete` = delete messages. Responses are JSON; errors are `{ "error": "...", "code": "..." }`.

## REST API (base https://otplane.com/api/v1)
| Method | Path | Description |
|---|---|---|
| GET | /me | Account, scopes, usable domains, reserved/shared mailboxes, watched temp addresses |
| POST | /addresses/random | Create a random temp address (scope `temp`). Body: `{ "domain": "otplane.com" }` optional |
| GET | /inbox/{address} | List messages. Query: `since` (ms), `limit` (≤100) |
| GET | /inbox/{address}/wait | Long-poll up to 55 s for new mail. Query: `since`, `timeout`, `from`, `subject`, `otp=1`. Returns `next_since` |
| GET | /inbox/{address}/messages/{id} | Full message: text, sanitized html, otp, verify_link, attachments. `html=0`, `mark_seen=0` |
| GET | /inbox/{address}/messages/{id}/raw | Original .eml |
| DELETE | /inbox/{address}/messages/{id} | Delete (scope `delete`) |
| GET | /updates | New mail across all reserved/shared/watched mailboxes after `since`; returns `unread`, `next_since` |

Message object: `id, from, from_name, subject, otp, verify_link, received_at, expires_at, seen, size, has_attachments, tag, original_to`.

### Example: sign up and read the OTP
```bash
TOKEN=otpl_xxx
ADDR=$(curl -s -X POST -H "Authorization: Bearer $TOKEN" https://otplane.com/api/v1/addresses/random | jq -r .address)
# … use $ADDR on a sign-up form …
curl -s -H "Authorization: Bearer $TOKEN" "https://otplane.com/api/v1/inbox/$ADDR/wait?otp=1&timeout=55" | jq -r '.messages[0].otp'
```

## MCP server
Endpoint: https://otplane.com/mcp (JSON-RPC over Streamable HTTP, same Bearer token). Tools: create a temp address, list messages, wait for a message / OTP, read a message, delete a message, account info.

## Webhooks
Configure on the API page. Each new message is POSTed as JSON with headers `X-OTPlane-Signature` (`sha256=` + HMAC-SHA256 of `timestamp.body`), `X-OTPlane-Timestamp`, `X-OTPlane-Event`, `X-OTPlane-Delivery`. Reject old timestamps to prevent replay. Only public https URLs are accepted.

## Addresses & routing
- `name+tag@domain` delivers to `name@domain` with `tag` set.
- Private domains can set a catch-all mailbox; `original_to` holds the original recipient.
- Temp addresses opened while signed in are watched for 6 hours (alerts via push, Telegram, extension).

## Limits
- Temp mail kept 7 days; reserved mail 60 days (renewed on sign-in). Max message size 10 MB.
- API rate limits per token; `/wait` max 5 concurrent per token.

## FAQ
### What is a temporary email?
A temporary (disposable) email is a real inbox you can use instantly without signing up — perfect for verification codes, trials and downloads without exposing your personal address. On OTPlane, temp mail is deleted after 7 days.

### Can I receive OTP and verification codes?
Yes. Mail arrives in real time and OTPlane detects OTP codes and verification links automatically so you can copy them in one click — or let the browser extension fill them in for you.

### Is it free?
Yes. Temporary email, reserved addresses, sharing, the API, MCP and webhooks are free. VIP plans add more reserved addresses and custom domains.

### Can I keep an address?
Create a free account and reserve the address: only you can read it, mail is kept 60 days and renewed every time you sign in.

### Does it work with AI agents?
Yes. OTPlane has a REST API and an MCP server (https://otplane.com/mcp) so agents like Claude Code or Cursor can create inboxes, wait for mail and read OTP codes.

### Can I use my own domain?
Yes. Add your domain or a subdomain, point MX to mx.otplane.com and add a verification TXT record — catch-all, name+tag@ addresses and team access are included.
