REST API · JSON

Build on TempMail

Generate disposable email addresses and read their inbox programmatically. Free for our own Android app's traffic — gated behind a quick application for everyone else.

Apply for API access View endpoints
TWO WAYS IN

Pick the tier that fits

App traffic

Mobile API (v1)

What powers our own Android app. Register a device, no approval needed, start generating addresses immediately.

  • Instant access — no application
  • Scoped to the addresses your install creates
  • 60 requests / minute per device
  • Intended for the official app, not third-party products
Mobile API docs
Premium · approval required

External Developer API

For your own product, script, or integration. Apply once, get approved, and you get a personal key.

  • Personal API key — issued after admin approval
  • 30 requests / minute per key
  • Full inbox read/delete for addresses you generate
  • Revocable — misuse ends the key, not your account
Apply now
HOW APPROVAL WORKS

From application to first request

01

Submit the application form below with your name, email, and what you're building.

02

We email you a private status link immediately — bookmark it, it's the only way to check your status without logging in.

03

An admin reviews and approves your application — usually within a couple of business days.

04

Your API key is emailed to you once, and shown on your status page. Start making requests right away.

EXTERNAL DEVELOPER API

Endpoint reference

Base URL: https://tempmail.pk/api/external/v1

Every request after approval needs your key as a Bearer token:

# Authorization header on every call
Authorization: Bearer tmk_your_key_here
GET /domains auth: Bearer key

Public receiving domains available for a custom address.

POST /emails auth: Bearer key

Generates a temp address and claims it for your key. Body: {"username"?, "domain"?} — omit both for a random address.

curl -X POST https://tempmail.pk/api/external/v1/emails \
  -H "Authorization: Bearer tmk_your_key_here" \
  -H "Content-Type: application/json" -d '{}'
GET /emails auth: Bearer key

Every address your key currently has claimed.

GET /emails/{email}/messages auth: Bearer key

Lists messages for an address your key has claimed. Returns 403 for any address you haven't generated through this API.

GET /emails/{email}/messages/{id} auth: Bearer key

Fetches a single message by id.

DELETE /emails/{email}/messages/{id} auth: Bearer key

Deletes a message permanently — no undo.

Error shape

Every non-2xx response is JSON, regardless of Accept header:

{ "error": "This credential has not claimed that email address." }
401 — missing/invalid key 403 — email not claimed 404 — message not found 422 — validation failed 429 — rate limited (30/min)
MOBILE API (V1)

For the official app

This is the API our own Android app uses for its own users — no application needed, since it's first-party traffic. Base URL: https://tempmail.pk/api/v1

# 1. Register once per install, keep the token forever
POST /api/v1/device/register  →  { token }

# 2. Use it as a Bearer token on every later call
POST /api/v1/emails  (Bearer token)  →  { email }
GET  /api/v1/emails/{email}/messages

If you're building your own product rather than contributing to our app, use the External Developer API above instead — it's the supported integration path for third parties.

REQUEST ACCESS

Apply for an API key

Tell us a little about what you're building. We review every application manually.