List available domains
curl --request GET \
--url https://api.tempmaillab.com/v1/domains \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tempmaillab.com/v1/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tempmaillab.com/v1/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tempmaillab.com/v1/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "dom_2x8k9m4n6p",
"name": "mail.example.com",
"tier": "public",
"status": "active",
"creation_enabled": true,
"receiving_enabled": true
}
],
"pagination": {
"has_more": false,
"next_cursor": null
}
}{
"error": {
"code": "invalid_request",
"message": "The request parameters are invalid.",
"request_id": "req_a1b2c3d4e5f6g7h8",
"details": [
{
"field": "cursor",
"reason": "invalid"
}
]
}
}{
"error": {
"code": "invalid_api_key",
"message": "A valid API key is required.",
"request_id": "req_a1b2c3d4e5f6g7h8"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated delay.",
"request_id": "req_a1b2c3d4e5f6g7h8"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}List available domains
Returns domains visible to the authenticated account. This is a one-shot request and does not trigger background refreshes. A successful response, a 304 response, and an authenticated processed 400/404 response consume one request; 401, 403, 429, server errors, and health/internal traffic do not consume the account request allowance.
GET
/
v1
/
domains
List available domains
curl --request GET \
--url https://api.tempmaillab.com/v1/domains \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tempmaillab.com/v1/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tempmaillab.com/v1/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tempmaillab.com/v1/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "dom_2x8k9m4n6p",
"name": "mail.example.com",
"tier": "public",
"status": "active",
"creation_enabled": true,
"receiving_enabled": true
}
],
"pagination": {
"has_more": false,
"next_cursor": null
}
}{
"error": {
"code": "invalid_request",
"message": "The request parameters are invalid.",
"request_id": "req_a1b2c3d4e5f6g7h8",
"details": [
{
"field": "cursor",
"reason": "invalid"
}
]
}
}{
"error": {
"code": "invalid_api_key",
"message": "A valid API key is required.",
"request_id": "req_a1b2c3d4e5f6g7h8"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated delay.",
"request_id": "req_a1b2c3d4e5f6g7h8"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"reason": "<string>",
"field": "<string>"
}
]
}
}Authorizations
Send a live API key in the Authorization header. Keys in query strings are rejected. A staging key never authenticates against production.
Headers
Return 304 when the current representation matches this entity tag.
Query Parameters
Maximum number of resources to return.
Required range:
1 <= x <= 100Opaque cursor returned by the previous page. Do not construct or modify it.
Required string length:
1 - 512Last modified on September 2, 2026