Why zero-key REST endpoints beat tiered QA mail walls
Automated authentication tests break constantly when teams share one static Gmail account across parallel CI jobs. Yet many disposable email providers lock even basic JSON polling behind RapidAPI subscriptions, rigid monthly credit tiers, or opaque per-request pricing.
temp-mail.agency REST API strips away that friction. Any CI runner, Playwright test, or Python script can call https://temp-mail.agency/api/v1 directly — generating isolated mailboxes per test case, pulling structured OTP JSON in one GET call, and burning mailboxes cleanly on teardown.
Complete /api/v1 endpoint reference
| Method & Path | Request Payload / Params | Response Highlights |
|---|---|---|
| GET /api/v1/domains | Optional ?provider=tempmail|orgmail|edumail | Live .com, .org.uk & .edu.pl pools |
| POST /api/v1/inboxes | { provider, alias?, domain_id?, ttl? } | Returns address, inbox_id & recovery_token |
| POST /api/v1/inboxes/restore | { recovery_token } | Reopens an existing signed tma_v1 mailbox |
| PATCH /api/v1/inboxes/:id/ttl | { ttl: "10m"|"1h"|"24h"|"7d"|"never" } | Extends inbox expiration cleanly |
| GET /api/v1/inboxes/:id/messages | Signed :id | Full text, HTML, attachments, OTPs & security audit |
| GET /api/v1/inboxes/:id/code | Signed :id | Newest 4–8 digit OTP code & confirmation URL |
| DELETE /api/v1/inboxes/:id | Signed :id | Deletes the mailbox immediately |
Machine-readable service discovery is also published at /.well-known/api-catalog following RFC 9727 linkset conventions.
Quickstart in cURL and Python
# 1. Provision a fresh isolated inbox
INBOX=$(curl -s -X POST https://temp-mail.agency/api/v1/inboxes -H "Content-Type: application/json" -d '{"provider":"tempmail","ttl":"10m"}')
echo "$INBOX"
# 2. Extract the newest OTP code or verification link
curl -s "https://temp-mail.agency/api/v1/inboxes/YOUR_INBOX_ID/code"
# 3. Tear down after test completes
curl -s -X DELETE "https://temp-mail.agency/api/v1/inboxes/YOUR_INBOX_ID"
Need full Playwright TypeScript and Python pytest polling fixtures with exponential backoff? Follow our step-by-step Playwright & Python Email Testing Tutorial.
temp-mail.agency REST API vs. paid tiered providers
- No credit card or RapidAPI gate: Start sending requests immediately from GitHub Actions, GitLab CI, or local scripts.
- Built-in OTP & magic-link extraction: Skip brittle HTML regex scraping —
/codefilters out CSS hex codes, table widths, and copyright years automatically. - Three live domain pools: Test how your own signup validator handles
.com, organization.org.uk, and academic.edu.pladdresses via theproviderfield. - Responsible polling etiquette: Poll every 3–5 seconds with a sensible 45–60 second timeout rather than tight sub-second loops, and always call
DELETEon teardown.
/api/v1 endpoint directly in your browser without writing a single line of code inside our live API Playground.
REST API vs. MCP Server: choosing the right interface
Use the REST API (/api/v1) inside deterministic CI suites (Playwright, Cypress, pytest, Go, Postman) where your test code controls every HTTP call. Use our hosted MCP Server (/mcp) when autonomous AI agents (Claude Code, Cursor, ChatGPT, Gemini, Grok Bot) decide dynamically when to spin up a test inbox and extract a code.