The TempsMail API lets you create a disposable inbox and read incoming mail programmatically. It's free and receive-only. Use it to test signup flows, catch one-time verification codes in automated tests, or build your own throwaway-email tools.
https://tempsmail.org/api
429 Too Many Requests. Back off and retry.The API is free, but it needs an account — that keeps it from being abused and gives you your own key:
YOUR_API_KEY.Reading an inbox also requires the secure_key token returned when you created that inbox, and requests must come from the same IP that created it. Keep your key private — treat it like a password.
Creates a random inbox and returns its address plus a secure_key you'll use to read it.
POST /api/extension/emails/{apiKey}
Example
curl -X POST "https://tempsmail.org/api/extension/emails/YOUR_API_KEY"
Response 200 OK
{
"status": true,
"data": {
"email": "[email protected]",
"fingerprint": "…",
"email_token": "…",
"secure_key": "eyJpdiI6…" // keep this; required to read the inbox
}
}
Returns the messages for an address. Send the secure_key from step 1 in the x-secret-token header. The request must come from the same IP that created the address.
GET /api/extension/messages/{apiKey}/{email}
Header: x-secret-token: {secure_key}
Example
curl "https://tempsmail.org/api/extension/messages/YOUR_API_KEY/[email protected]" \
-H "x-secret-token: eyJpdiI6…"
Response 200 OK
{
"status": true,
"mailbox": "[email protected]",
"messages": [
{
"id": "b7f3…",
"from": "GitHub",
"from_email": "[email protected]",
"subject": "Your verification code",
"date": "2026-08-21 15:42:00",
"content": "<p>Your code is 123456</p>"
}
]
}
An empty inbox returns "messages": []. Poll this endpoint every few seconds to wait for a message.
Returns the domains you can use for addresses.
GET /api/domains/{apiKey}/all
curl "https://tempsmail.org/api/domains/YOUR_API_KEY/all"
| Field | Type | Description |
|---|---|---|
id | string | Unique message id (use it to fetch or delete). |
from | string | Sender display name. |
from_email | string | Sender email address. |
subject | string | Subject line (tags stripped). |
date | string | When the message was received. |
content | string | Message body, HTML when available. |
| Status | Meaning |
|---|---|
401 | Wrong API key, or missing/invalid x-secret-token, or reading from a different IP. |
404 | Address not found or mailbox unavailable. |
429 | Rate limit hit. Slow down and retry. |