Get current usage
curl --request GET \
--url https://api.tempmaillab.com/v1/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tempmaillab.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tempmaillab.com/v1/usage"
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/usage",
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": {
"starts_at": "2023-11-07T05:31:56Z",
"resets_at": "2023-11-07T05:31:56Z",
"allowance_mode": "lifetime",
"monthly_allowance": 5050,
"plan_code": "free_100_lifetime",
"requests_used": 1,
"requests_remaining": 1,
"additional_requests_remaining": 1
}
}{
"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>"
}
]
}
}Get current usage
Returns only the authenticated account’s current allowance and request consumption. Free includes 100 requests for the lifetime of the account and never renews. Premium includes 10,000 requests per UTC calendar month; billing renewals do not reset that calendar window. This endpoint does not consume request allowance. Short-window throttling is a best-effort Cloudflare edge safety control scoped to a Cloudflare location, not a globally exact billing counter; the allowance returned by this endpoint is authoritative.
GET
/
v1
/
usage
Get current usage
curl --request GET \
--url https://api.tempmaillab.com/v1/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tempmaillab.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tempmaillab.com/v1/usage"
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/usage",
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": {
"starts_at": "2023-11-07T05:31:56Z",
"resets_at": "2023-11-07T05:31:56Z",
"allowance_mode": "lifetime",
"monthly_allowance": 5050,
"plan_code": "free_100_lifetime",
"requests_used": 1,
"requests_remaining": 1,
"additional_requests_remaining": 1
}
}{
"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>"
}
]
}
}Last modified on September 2, 2026