Tempx developer documentation

Test emails from your application or AI agent: send mail through the SMTP capture gateway and read, search and wait over MCP — one API key unlocks both, plus the Resend-compatible adapter. The reference is generated from the same registry that powers llms.txt, so it does not drift from the API. Tempx's own clients (web app, browser extensions) talk to an internal product API that is not part of this public reference. For the concepts first, read email testing and SMTP testing.

SMTP capture gateway — get test mail in

The primary integration for applications: point your application's mailer at the gateway and every message is captured into the credential's paired inbox — original recipients preserved, nothing ever relayed to a real person.

SettingValue
Hostsmtp.tempx.uk
Port587
EncryptionSTARTTLS (required)
Credentials — dedicatedtmtp_ username + password, minted in the account (account → SMTP testing) or by an agent via the MCP create_smtp_credential tool
Credentials — API keyAn API key with the send permission doubles as a credential: username tkey_<uid>.<connId>, password = the key
DeliveryCapture-only: stored in the credential's paired inbox, never forwarded

Stack-specific setup (Laravel, Rails, Django, Node, n8n) is on the integrations page; the concept is covered at /smtp-testing.

MCP server — read, search and wait, for AI agents

The primary integration for AI agents and automated verification. Agents get their own inbox through the Model Context Protocol. Preferred auth is browser pairing (OAuth 2.1 with PKCE — the user approves one inbox, no secret is pasted); everywhere else, use an API key (tmcp_) as the Bearer token — the same key that also covers SMTP and Resend capture. Each key is scoped to exactly one inbox, expires on a chosen schedule, and can be revoked in one click.

ToolWhat it does
list_inboxesList the inboxes visible to this connection (one).
get_inboxInbox metadata and unread state.
list_emailsRecent messages, newest first.
get_emailOne message in full (sanitized HTML and text).
search_emailsSearch by sender, subject or content.
wait_for_emailLong-poll until a matching message arrives (5–175 s) — built for verification codes.
send_emailCompose mail into the connection's own inbox — capture-only, never delivered.
create_smtp_credentialMint an SMTP credential for the same inbox.

Endpoint: https://tempx.uk/mcp (streamable HTTP). Claude Code connects with `claude mcp add --transport http tempx https://tempx.uk/mcp`; pairing guides for Claude, ChatGPT and Z.ai are on the Connect Claude page.

API keys — one key for MCP, SMTP and Resend capture

Most integrations start with one API key, created in the account at tempx.uk/account#mcp (the “API keys” tab). The key carries tmcp_ prefix, is scoped to exactly one inbox you select, and works across three surfaces at once. Keys are shown exactly once at creation, stored server-side only as a hash, and support read / search / wait / send permissions with an expiry of 1, 7, 30, 90 days or none. Revoking the key — or letting it expire — cuts off MCP, SMTP and Resend capture simultaneously.

SurfaceHow the same key is used
MCP serverAuthorization: Bearer tmcp_… against https://tempx.uk/mcp. read/search/wait control the mail tools; send unlocks send_email and create_smtp_credential.
SMTP gatewayUsername tkey_<uid>.<connId>, password = the API key itself (send permission required). Derive the username from the key: tkey_ plus the first two dot-separated segments after tmcp_.
Resend-compatible capturePOST https://tempx.uk/resend/emails with the key as the Bearer token / SDK API key (send permission required).

Prefer not to hold a key at all? The MCP server also supports browser pairing via OAuth 2.1 (used by Claude and ChatGPT connectors): the user signs in at tempx.uk and approves one inbox — no secret is pasted anywhere.

Resend-compatible capture endpoint

Apps already using the Resend SDK can capture their sends without touching the mailer: point the SDK's base URL at Tempx and swap the API key. Requests are parsed in Resend's send-email shape, and the message is captured into the key's inbox — with Resend-shaped success and error bodies, so the SDK parses the response natively. The same adapter contract is how future providers (SendGrid, Mailgun, Postmark) will be added.

POST /resend/emails

Capture one outgoing test message in Resend send-email format.

Auth: Authorization: Bearer tmcp_… (or the SDK's apiKey field set to the key). The send permission is required. · Rate limit: 30 requests / 5 minutes per key

Parameters

ParameterDescription
from, to, subjectResend send-email fields (html / text / react bodies supported by the adapter's parsing).
  • SDK setup (Node): new Resend({ apiKey: process.env.TEMPX_KEY, baseUrl: "https://tempx.uk/resend" }). Everything else in the integration stays unchanged.
  • The message is never delivered — from/to are preserved on the captured copy for assertions.
  • A missing or wrong-scope key returns Resend-shaped errors: missing_api_key (401) and missing_scope (403).
curl -X POST https://tempx.uk/resend/emails \
  -H "Authorization: Bearer tmcp_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"from":"app@yourdomain.test","to":"user@example.net",
       "subject":"Reset your password","html":"<p>Token: 123456</p>"}'

Response: Resend-shaped success: { id } for the captured message; provider-shaped error bodies on failure.

Setup walkthrough with Node and curl examples: the Resend testing guide on the blog, or the SMTP integration page for mailer-based setups.

Security model: choose the right inbox

Two inbox kinds share one product, and the difference is who holds the key. Named inboxes are public by design — this is the classic public-inbox model, chosen for zero-friction testing, and it is documented in the app, the FAQ and the Terms. Private random inboxes are the security boundary for everything else.

AspectNamed inbox (public)Private random inbox
AddressingYou pick the name; every Tempx domain is an alias of the same inbox12-character random local part — unguessable
Who can readAnyone who knows or guesses the nameOnly holders of the signed bearer token
Who can deleteAnyone — clearing a public box is open to all, by designOnly the token holder
RetentionUp to 7 days1 hour
Created byNothing to create — the inbox exists on first deliveryThe browser app or the account page
Right forThrowaway sign-ups, demos, anything you would post on a wallAnything you would NOT post on a wall: sensitive test mail, verification codes you do not want observed, personal use

Never point accounts that matter at a named inbox — password resets and two-factor mail sent to a guessable name can be read by strangers, and the Terms of Service prohibit using Tempx for exactly that. Opening, harvesting or enumerating inboxes belonging to other people is a misuse of the service and may be unlawful. Rate limits blunt bulk scraping: 240 reads/min per source, plus a distinct-address cap — roughly 150 different public inboxes per hour per source — that specifically blunts name-enumeration. Cloudflare bot management sits in front of everything.

The product API — first-party, not a public developer API

Tempx's own clients talk to the site over a REST surface: the web app reads and clears inboxes (GET/DELETE /api/inbox), creates private inboxes (POST /api/mailbox, Turnstile-gated), and manages accounts over session-cookie endpoints; the Chrome and Firefox extensions poll GET /api/inbox — ?address= for named inboxes, an Authorization: Bearer header for private ones. That surface exists to power these first-party clients and stays working for them, but it is an internal product contract, not a public developer API. Official integrations should use the surfaces above: SMTP capture to get mail in, MCP to read, search and wait. Scripts you own that need raw JSON should authenticate with a private inbox's Bearer token instead of building on public named inboxes.

First-party consumerHow it talks to Tempx
Web appSame-origin REST + session cookies — GET/DELETE /api/inbox, /api/me, /api/inboxes/*, SSE at /api/events
Chrome extensionGET /api/inbox — ?address= for named inboxes, Authorization: Bearer <token> for private ones (host permission, no CORS involved)
Firefox extensionSame contract as the Chrome extension
SMTP pipelineThe gateway posts captured mail to internal endpoints with a shared secret; your application only ever speaks SMTP
MCP serverReads mailboxes directly — the generic REST surface is not involved

Because the contract of these endpoints is with Tempx's own clients, they can change or tighten without notice. The supported developer surfaces — SMTP capture, MCP and the Resend adapter — are documented to a different standard: they are stable, versioned by this reference, and safe to build on.

Public stats

Aggregate, anonymous usage counters — handy for status pages.

GET /api/stats

Weekly aggregate counters (inboxes created, emails received).

Auth: None. · Rate limit: Cached at the edge

  • Aggregate counts only — never per-address data.
curl -s https://tempx.uk/api/stats

Response: { weekly: { inboxesCreated, emailsReceived, … } }

Limits and rules that apply to everything above

RuleValue
Retention — named inboxesMessages deleted automatically 7 days after arrival.
Retention — private random inboxesMessages deleted automatically 1 hour after arrival.
SendingReceive-only by design. The SMTP gateway is capture-only: composed mail is stored in your inbox, never delivered.
Browser CORSThe inbox API is for server-side calls; cross-origin browser requests are refused by design.

Automated abuse — inbox harvesting, ban evasion, bulk account creation — is prohibited by the Terms of Service and blocked by rate limits. Report abuse to abuse@tempx.uk.

Try it in one request

Send any email to docs-demo-1@tempx.uk and read it back — no account, no key.

curl -s "https://tempx.uk/api/inbox?address=docs-demo-1@tempx.uk"
Explore the developer toolkit