Create new temporary email
POST/v1/emails
Create new temporary email
Request
- application/json
Body
- public
- custom
- premium
Specific email address to create. If not provided, a random email address will be generated.
Specific domain to use. If not provided, a random domain will be used. If email is provided, this field will be ignored.
domain_type
object
Specific domain type to use. If not provided, a random domain type will be used. If email or domain is provided, this field will be ignored.
oneOf
Return email from public domain
Return email from custom domain
Return email from premium domain
Responses
- 200
- 400
- 429
success response
Response Headers
X-Ratelimit-Limit
integer
Example: 100
The maximum number of requests that you can make per period
X-Ratelimit-Remaining
integer
Example: 99
The number of requests remaining in the current rate limit window
X-Ratelimit-Used
integer
Example: 1
The number of requests you have made in the current rate limit window
X-Ratelimit-Reset
integer
Example: 1723886474
The time at which the current rate limit window resets, in UTC epoch seconds
- application/json
- Schema
- Example (from schema)
Schema
Time to live in seconds
{
"email": "user@example.com",
"ttl": 86400
}
code error
- application/json
- Schema
- Example (from schema)
Schema
- request_error
- api_error
error
object
type
object
Type of error encountered.
oneOf
Typically means there's a problem with the request that you made.
Typically means there's a problem with the Temp Mail API.
Error code. Some common codes are not_found
, invalid_api_key
, rate_limited
, validation_error
.
meta
object
Information about this response.
Unique ID for the request relating to this response. Provide this when contacting Temp Mail support about a specific request.
{
"error": {
"type": "request_error",
"code": "not_found",
"detail": "Message not found"
},
"meta": {
"request_id": "a48b927e-3a24-42ff-a748-d516e5474f85"
}
}
rate limit error
- application/json
- Schema
- Example (from schema)
Schema
- request_error
error
object
type
object
Type of error encountered.
oneOf
Typically means there's a problem with the request that you made.
meta
object
Information about this response.
Unique ID for the request relating to this response. Provide this when contacting Temp Mail support about a specific request.
{
"error": {
"type": "request_error",
"code": "rate_limited",
"detail": "You have reached your rate limit. Please try again later."
},
"meta": {
"request_id": "a48b927e-3a24-42ff-a748-d516e5474f85"
}
}