TempMail Public API
A free REST API to generate disposable email addresses and receive messages — no signup, no API key required.
Base URL
All API endpoints are prefixed with /api/v1. Requests and responses use JSON. No authentication is required.
Rate Limits
Rate limits are per IP address, reset every 60 seconds. Exceeded requests return HTTP 429.
| Endpoint group | Limit / minute |
|---|---|
| GET endpoints (read) | 60 req/min |
| POST /mailbox (create) | 30 req/min |
| DELETE /mailbox (delete all) | 20 req/min |
| DELETE /messages/:id | 30 req/min |
Error Format
All errors return a JSON body with an error field and the appropriate HTTP status code.
| Code | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 400 | Bad Request — invalid parameter |
| 404 | Not Found |
| 429 | Too Many Requests — rate limit hit |
Health Check
Returns current service status and available domains.
List Domains
Returns the list of supported mail domains you can use when creating a mailbox.
Create Mailbox
Creates a new temporary mailbox. Emails expire after 1 hour. You can optionally supply a custom name and choose a domain.
| Field | Type | Description |
|---|---|---|
| name optional | string | Custom inbox name. Only a–z, 0–9, dot, dash, underscore. If omitted, a random name is generated. |
| domain optional | string | Mail domain: mail.ddd.io.vn or c3nbkhiem.org. Defaults to mail.ddd.io.vn. |
Get Messages
Returns all messages for a given email address. The :email must be URL-encoded.
| Param | Type | Description |
|---|---|---|
| :email required | string | URL-encoded email address, e.g. hello%40mail.ddd.io.vn |
| Param | Default | Description |
|---|---|---|
| page optional | 1 | Page number (1-based) |
| limit optional | 20 | Items per page, max 50 |
Read Message
Fetches the full content of a message including HTML and plain text body. Also marks the message as read.
| Param | Type | Description |
|---|---|---|
| :id required | string | Message ID from the inbox list |
Delete Message
Permanently deletes a single message by ID.
Delete Mailbox
Permanently deletes all messages for the given email address. The :email must be URL-encoded.
Quick Example
Full workflow — generate an address, wait for email, read it: