Base URL
Important: Cloudflare Turnstile
TempInbox uses Cloudflare Turnstile to protect thePOST /api/new_address endpoint from abuse. This means:
- Browser-based use works automatically — Turnstile runs invisibly in the UI
- Automated/API use requires a valid
cf_token— you must solve a Turnstile challenge before creating an address
For developer and QA automation, the recommended approach is to use the TempInbox web UI to pre-create addresses, copy the JWT from the browser (cookies or response body), and then use that JWT directly in your scripts to call the mail endpoints. The mail endpoints (
/api/mails, /api/mail/:uuid) do not require Turnstile.Getting a JWT for automation
- Open tempinbox.dev in your browser
- An address is created automatically — the JWT is set as an
HttpOnlycookie namedjwt - Open DevTools → Application → Cookies → copy the
jwtvalue - Use it as
Authorization: Bearer <jwt>in your API calls
POST /api/new_address returns a JWT directly with no challenge.
Authentication
Most endpoints require a JWT bearer token:Rate Limits
Rate limiting applies per IP on all write and read endpoints. Exceeded requests return429 Too Many Requests.
Recommendations for automation:
- Add 2–3 second delays between poll attempts on
/api/mails - Do not create new addresses in tight loops — reuse JWTs across test runs where possible
- Use one inbox per test run, not one per assertion
Endpoint Groups
Response Format
All responses are JSON unless noted. Errors return plain text with an appropriate HTTP status code.Related reading
- Temp Mail API: Automate Disposable Inbox Flows — use cases and API walkthrough
- Temp Email for Developers: API, CI, Testing — how the API fits developer workflows
- Playwright, Cypress, and CI Pipeline guides — runnable examples