Integrate Temp Mail into your applications
Premium users get full API access. Generate your API key to start integrating.
Not a premium user? Upgrade now
These requests use the real service and your own account.
—
All API requests require authentication using your API key. Include your key in the X-API-Key header:
X-API-Key: YOUR_API_KEY
Create a new temporary email address.
| Parameter | Type | Required | Description |
|---|---|---|---|
username |
string | No | Custom username (random if not provided) |
domain |
string | No | Domain from available list |
duration |
integer | No | Duration in minutes (default: 10) |
curl -X POST https://api.tempmail.com/v1/email/create \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "mytemp", "domain": "tempmail.org"}'
{
"success": true,
"email": "mytemp@tempmail.org",
"expires_at": "2024-12-20T10:30:00Z",
"session_id": "abc123xyz"
}
Retrieve all messages for an email address.
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | The email address |
limit |
integer | No | Max messages to return (default: 50) |
curl -X GET https://api.tempmail.com/v1/messages/mytemp@tempmail.org \ -H "X-API-Key: YOUR_API_KEY"
Retrieve a specific message by ID.
{
"id": 123,
"from_address": "sender@example.com",
"subject": "Welcome to our service",
"body": "Email content here...",
"html_body": "<p>Email content here...</p>",
"received_at": "2024-12-20T10:15:00Z",
"attachments": []
}
Delete an email address and all its messages.
Get list of available domains for creating emails.
{
"domains": [
"tempmail.org",
"netlink.com",
"tmpmail.net"
],
"premium_domains": [
"business.mail",
"secure.email"
]
}
Reference plan limits; policy enforcement will be connected in the subscription phase.
| Plan | Requests/Day | Requests/Minute |
|---|---|---|
| Free | 100 | 10 |
| Premium | 10,000 | 100 |
| Business | Unlimited | 1000 |
| Code | Description |
|---|---|
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid API key |
404 |
Not Found - Resource doesn't exist |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error |