BYTETOOLS

Mail.tm API

Free disposable email API with no key: create temporary inboxes programmatically and read incoming messages. Ideal for testing signup flows. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the Mail.tm API?

Mail.tm is a free, key-free API for creating temporary email inboxes programmatically and reading the messages they receive, designed for testing email flows without using real addresses.

Mail.tm lets you create a throwaway inbox from code, then poll it for incoming mail. That makes it genuinely useful for end-to-end testing of signup, password reset and verification flows, where you need to receive and act on a real email.

The API follows the JSON:API / Hydra convention, so collections come back with `hydra:member` arrays and `@id` identifiers. Creating an account then requires fetching a token before you can read messages — a two-step flow worth building once and reusing.

Quick facts

Base URL
https://api.mail.tm
Authentication
Listing domains needs no auth. Creating an account and reading messages requires a bearer token obtained from /token.
Rate limit
8 requests per second per IP.
Pricing
Free.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Mail.tm API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. List available email domains

GET https://api.mail.tm/domains

curl
curl 'https://api.mail.tm/domains'
JavaScript (fetch)
const res = await fetch("https://api.mail.tm/domains");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.mail.tm/domains", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "@context": "/contexts/Domain",
  "@id": "/domains",
  "@type": "hydra:Collection",
  "hydra:totalItems": 1,
  "hydra:member": [
    {
      "@id": "/domains/6a766046e6e7307e1080ab01",
      "@type": "Domain",
      "id": "6a766046e6e7307e1080ab01",
      "domain": "emalupe.com",
      "isActive": true,
      "isPrivate": false,
      "createdAt": "2026-08-07T00:00:00+00:00",
      "updatedAt": "2026-08-07T00:00:00+00:00"
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
domainspathOptionalAvailable domains for new addresses. domains
accountspathOptionalPOST to create an account with address and password. accounts
tokenpathOptionalPOST credentials to obtain a bearer token. token
messagespathOptionalList messages for the authenticated account. messages

Response fields

hydra:memberarray
The collection items — domains, messages or accounts.
hydra:totalItemsinteger
Total items in the collection.
@idstring
Resource identifier path.
domainstring
On the domains endpoint, an available email domain.
(messages) from / subject / introobject|string
Sender, subject and message preview.

What you can build with the Mail.tm API

  • Automate end-to-end testing of signup and verification emails
  • Test password reset flows in CI without a real mailbox
  • Verify email templates render correctly when received
  • Create throwaway addresses for QA environments

Common errors and how to fix them

401 on messages

You have not obtained a token.

Fix: POST credentials to /token and send the result as `Authorization: Bearer <token>`.

422 creating an account

The address uses a domain not on the available list.

Fix: Fetch /domains first and build the address from an available domain.

Messages disappear

Temporary inboxes are deleted after a period of inactivity.

Fix: Do not rely on them for anything persistent; they are for testing only.

Mail.tm API — frequently asked questions

Is Mail.tm free?

Yes, free with no API key. Listing domains is unauthenticated; creating an account and reading messages requires a bearer token you obtain from the API itself.

What is it useful for?

Automated testing of email flows — signup verification, password resets — where a test needs to actually receive and open an email without a real mailbox.

How long do inboxes last?

They are temporary and removed after a period of inactivity. Never use them for anything you need to keep.

Should I use it to bypass email verification on other services?

No. That breaks most services' terms of use. Its legitimate purpose is testing your own email flows.

Tools that pair with this API

Mail.tm is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.