Temp Mail API: I Created a Disposable Inbox With One Request — Here's What Actually Works in 2026
Temp Mail API: I Created a Disposable Inbox With One Request — Here's What Actually Works in 2026
A temp mail API is a disposable inbox with the browser removed. Instead of opening a website, clicking "generate", and watching an inbox, your code sends one HTTP request and gets back an email address. A second request lists whatever arrived. A third deletes the whole thing. That is the entire product, and the reason it exists is the same reason disposable email exists at all: sometimes a test, a signup, or a script needs an address that can receive mail and then disappear, without a human anywhere near it.
I tested one live before writing this. One GET request to GuerrillaMail's public API returned a working address, pypnwalr@guerrillamailblock.com, plus a session token. A second request to check that inbox returned one message: GuerrillaMail's own welcome email, already sitting there. Two requests, no account, no key, no form. The rest of this post is the map around that test: what the API actually does, the free keyless options compared on facts I could verify, TempoMailUSA's own API as documented today, the code to poll for a verification code, and the five checks that decide whether any of these is safe to build on. If you searched for "tempmail api" — the same phrase without the spaces — this is the same post. The spelling is a variant; the product is identical.
What a temp mail API actually does
Strip away the marketing and every temp mail API does three things. It creates an inbox on demand and hands you the address. It lets you list and read the messages that arrive in that inbox. And it lets you delete the inbox when you are done. Some add a fourth convenience: they pull the six-digit verification code or the confirmation link out of a message for you, so your code never has to parse raw email. That is the whole interface. There is no compose window, no folders, no contacts — the API is the inbox reduced to its load-bearing parts.
The second thing to understand is that these APIs are receive-only, and that is deliberate rather than a missing feature. A service that let anyone send email from any disposable address through a keyless endpoint would be an open relay, and it would be shut down by every spam filter on the internet within a week. So none of the free options send mail. If your flow needs to send a password reset or a receipt, you are looking for a different product entirely — an API that sends email, which is the subject of the secure email API guide on this site. A temp mail API answers the opposite question: how does my code receive mail without owning an inbox?
The third thing is who it is for. The three real audiences are QA engineers testing signup flows, developers automating anything that needs a verification code, and AI agents doing the same work a human used to do by hand — create an inbox, register somewhere, fetch the code. That last audience is why these APIs suddenly matter more than they did two years ago: an agent that can call an HTTP endpoint can now complete a signup flow end to end, and the temp mail API is the piece that gives it an address.
I tested one live: one request, one inbox, one email
GuerrillaMail has the oldest public temp mail API I know of, and it is also the simplest to test, because it needs no key and its creation step is a GET request. Here is exactly what I ran, and exactly what came back, on 24 November 2026.
The first request asked for an address:
GET https://api.guerrillamail.com/ajax.php?f=get_email_address&lang=en
The response came back HTTP 200 with a JSON body naming the address pypnwalr@guerrillamailblock.com, a session token, and a timestamp. No account existed before that request and none exists after it — the address and the token are the entire session. The address lives on GuerrillaMail's block domain, which is the point: it is obviously disposable, and any service that blocks disposable domains will block it. That is a feature of the test, not a flaw in it.
The second request checked the inbox:
GET https://api.guerrillamail.com/ajax.php?f=check_email&seq=0&sid_token=...
It returned one message: a welcome email from no-reply@guerrillamail.com with the subject "Welcome to Guerrilla Mail", addressed to the new inbox. The inbox was seconds old and already had mail in it — which is the whole test, really. Creation worked, delivery worked, and reading worked, all through GET requests with no authentication at all.
I also tried mail.tm, the other well-known keyless option, and here I have to be honest about what I could and could not verify. Its domain list endpoint answered fine — one active domain, euploading.com — but the account-creation POST timed out twice from this machine, while GET requests to the same host kept working. That pattern points at my own connection, not at mail.tm: a POST timing out while GETs succeed is what a flaky egress path looks like, and I am not going to declare a service broken on the strength of two timed-out requests from one VM. What I can say from its public documentation is that mail.tm works differently from GuerrillaMail — you create an account with an address and password, exchange those for a token, and then read messages with that token — and that its domain list is genuinely public. If you test it yourself and the POST works first try, that tells you more about your network than about the API.

The free keyless options, compared on facts I could verify
The search results for this keyword are dominated by API documentation pages, not reviews, so the honest way to compare them is to list what each one actually offers and what it charges for it. Everything in this table comes from the providers' own pages as they stand today; where I could not verify a claim myself, I say so.
| Provider | Auth | How you get an inbox | Inbox lifetime | Code extraction |
|---|---|---|---|---|
| GuerrillaMail | None — session token in the URL | One GET request | Session-based, short-lived | No — you parse the message yourself |
| mail.tm | Account + token (no API key) | POST an address and password, then exchange for a token | Account-based; domains list is public | No — you parse the message yourself |
| tempmail.ai | None — no sign-up, no key | POST /accounts returns a random address and password | 24 hours | Yes — verification codes extracted for you |
| best-tempmail | None on free tier; x-api-key on paid | POST /inboxes, no signup | 2 hours free; up to 7 days paid | Yes, via SDKs and a Playwright fixture |
| tempgenerator | Bearer API key | POST /inboxes with a developer token | Token-based; keys expire after 90 days, 10 per account | Yes — codes and links in the message response |
A few things in that table deserve a longer look. Best-tempmail's free tier is the most generous on paper — no signup at all — but it caps you at three inbox creations a day per IP, which is fine for trying it out and useless for a real test suite. Its paid tiers start at $19.99 a year for the Founders plan and $29.99 a month for Pro, and the paid side is where the serious tooling lives: official Node and Python SDKs, a Playwright fixture that hands every test its own inbox, a GitHub Action, and an MCP server so an AI assistant can drive it directly. Tempgenerator is the most automation-shaped of the five: its wait endpoint holds the request open for up to 20 seconds and returns the moment a message arrives, instead of making you poll in a loop, and it also ships an MCP server. Tempmail.ai is the simplest of the keyless three — no key, no signup, codes already extracted, mailboxes gone after a day — and it publishes an OpenAPI spec, which means you can import the whole API into Postman without writing anything.
The pattern across all five is that the free tier is a real product, not a demo. The limits are the product: short lifetimes, low creation caps, and public inboxes. Which brings us to the question that actually decides which one you pick.
TempoMailUSA's own API: the endpoints, as documented today
This site has its own API, and its documentation is public at the developer docs. I read the page today, and the endpoint list is short enough to reproduce in full. Everything runs under https://tempomailusa.com/v1/ and authenticates with an X-API-Key header:
GET /domains/{type?}— list active domains for new mailboxes; the type can beall,free, orpremium.POST /emails— generate a new temporary address, with an optional custom username and domain in the JSON body.POST /emails/{email}/{username}/{domain}— change an existing address to a custom username and domain.DELETE /emails/{email}— permanently delete a mailbox and invalidate its tokens.GET /messages/{email}— retrieve all incoming mail for an address.GET /messages/{email}/{messageId}— read one message in full, HTML and plaintext, with attachments.DELETE /messages/{email}/{messageId}— remove a single message.GET /account— check your quota, plan details, and rate limits.
Two things about this API are worth knowing before you plan around it. First, it is a paid add-on — the site's pricing lists API access as a yearly add-on, not part of the free tier — so the keyless services above are the place to start if you are only experimenting. Second, the site also documents HMAC SHA-256 webhooks, which is the grown-up version of the polling loop in the next section: instead of asking "is the code here yet" every few seconds, the service calls your server the moment mail arrives, and the signature proves the call really came from TempoMailUSA. The site's own April guide to the API covers the RapidAPI route to the same service, if you would rather subscribe through RapidAPI than directly — that guide is at Tempomailusa API Access and Integration Guide.
I did not run a live call against this API for this post, because it needs a paid key and I am not going to invent a response I never saw. The endpoint list above is what the documentation says, read today. That is the honest boundary of what I can tell you about it, and it is also why the GuerrillaMail test above matters: it is the part of this post I actually ran.
The code: polling for a verification code in Python
Here is the smallest useful version of the pattern, written against GuerrillaMail because it needs no key and every step is a GET. It creates an inbox, waits for mail, and pulls a six-digit code out of the first message with a regular expression. The polling loop is the part everyone gets wrong — poll too fast and you hammer the service, poll too slow and your test times out — so the sleep is deliberate.
import re, time, requests
BASE = "https://api.guerrillamail.com/ajax.php"
# 1. Create the inbox — one GET, no key, no account.
addr = requests.get(BASE, params={"f": "get_email_address", "lang": "en"}, timeout=20).json()
email, token = addr["email_addr"], addr["sid_token"]
print("inbox:", email)
# 2. Poll for mail. Your signup happens here, using `email` as the address.
code = None
for _ in range(30):
msgs = requests.get(BASE, params={"f": "check_email", "seq": 0, "sid_token": token}, timeout=20).json()
for m in msgs.get("list", []):
found = re.search(r"\b(\d{6})\b", m.get("mail_excerpt", ""))
if found:
code = found.group(1)
break
if code:
break
time.sleep(2)
print("code:", code)
Three notes on that snippet. First, the regex looks for a six-digit number in the message excerpt, which is where most verification codes live; if the code is four or eight digits, change the {6}. Second, the loop gives up after a minute, because a test that polls forever is a test that hangs your CI pipeline at 2 a.m. Third, this is the shape every other provider's SDK wraps for you — tempmail.ai and tempgenerator extract the code server-side, and best-tempmail's Playwright fixture does the waiting in one call — so if you find yourself writing this loop a third time, stop and use one of theirs.
The equivalent first call against TempoMailUSA's own API is one curl command from its documentation, with your key in place of the placeholder:
curl -X POST "https://tempomailusa.com/v1/emails" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "tester123", "domain": "tempomailusa.com"}'
Five checks before you build on one
An API that works in a curl test and an API that survives in production are different things, and the difference is almost always one of these five.
1. Does the inbox live longer than your test? A two-hour inbox is fine for a signup test and useless for a password-reset flow you run tomorrow. Best-tempmail's free inboxes last two hours; tempmail.ai gives you a day; GuerrillaMail's are session-based and short. Match the lifetime to the job, and remember that a free address on this site lasts about 30 days — a live test on this site today showed a fresh address with 29 days and 12 hours left on its clock — which is the long end of what disposable means.
2. Is the inbox private? On the keyless free tiers, anyone who knows the address can read the inbox — best-tempmail says so plainly in its own documentation. That is acceptable for a throwaway signup code and unacceptable for anything you would not want a stranger to see. If the contents matter, you need the keyed tier, where the inbox belongs to the key that created it.
3. What are the rate limits? Three inbox creations a day per IP is a demo, not a pipeline. Tempgenerator's keyed tiers exist precisely because a test suite that creates fifty inboxes an hour needs a quota, not a free tier. Check the limit before you wire the API into CI, or your Monday morning test run will fail on the fourth inbox.
4. Who extracts the code? Parsing verification codes out of raw email is fiddly work — HTML bodies, quoted-printable encoding, codes split across lines. Tempmail.ai and tempgenerator do it for you; GuerrillaMail and mail.tm leave it to your regex. If you are writing the polling loop yourself anyway, the regex is ten lines. If you want the code handed to you, pick a provider that extracts it.
5. Remember it is receive-only. None of these services send mail, and none of them will ever help you with a flow that needs an outbound message. If the flow you are testing sends email — a password reset, an order confirmation — the sending side is a different API, and the secure email API guide explains what makes one of those trustworthy.

Where temp mail APIs break
Honesty requires the failure modes, because the search results for this keyword mostly skip them. The first is the disposable-domain blocklist. Many services check new signups against lists of known temporary domains, and GuerrillaMail's domains are on all of them — which is exactly why the address I created for this test would fail on a strict signup form. TempoMailUSA's answer to this is domain reputation management on its premium domains, and the other providers solve it the same way, with varying success. If the service you are testing rejects the address outright, no API will fix that; you need a different domain, not a different endpoint.
The second is the password reset you need next month. A disposable inbox is, by design, an address you cannot get back into. If you use one to create an account and the service later asks you to confirm a password reset, the inbox may be gone — and with it, the account. This is the single most common way people lose accounts to temp mail, and it is why the API's delete endpoint exists: use the inbox for the test, then delete it, and never build anything permanent on it.
The third is the phone gate. An increasing number of services accept the email, send the code, and then ask for a phone number anyway. The temp mail API solved the email half of that flow and nothing else, and no amount of polling will get you past a phone check. If you hit one, the API did its job and the service moved the goalposts.
FAQ
What is a temp mail API?
An HTTP API that creates disposable email inboxes on demand and lets your code read what arrives in them. You create an inbox with one request, use the address in a signup or test, then read the verification code or confirmation link with a second request. It is the programmable version of a temp mail website.
What is a tempmail api?
The same thing — "tempmail api" is the same search written without spaces. It refers to the same product: an API for disposable inboxes, not a different service. This post covers both spellings because they mean the same thing.
Is there a free temp mail API?
Yes. GuerrillaMail, mail.tm, tempmail.ai, and best-tempmail all have free tiers that need no signup and no key, and I created a working inbox on GuerrillaMail's free tier for this post. The free tiers limit you — short inbox lifetimes, a few creations a day, public inboxes — and the paid tiers remove those limits.
Can I send email with a temp mail API?
No. Every temp mail API I found is receive-only by design. A keyless API that could send mail would be an open relay. If you need to send, you need a transactional email API, which is a different product.
Do I need an API key?
Not for the free tiers — GuerrillaMail uses a session token returned when you create the inbox, mail.tm uses an account and token, and tempmail.ai needs nothing at all. You need a key when you move to a paid tier, or when you use TempoMailUSA's own API, which authenticates with an X-API-Key header.
How long do temp mail API inboxes last?
It depends on the provider: two hours on best-tempmail's free tier, 24 hours on tempmail.ai, session-based on GuerrillaMail. Paid tiers extend that — best-tempmail's Pro plan allows up to three days, and its Founders plan up to seven. A free inbox on this site lasts about 30 days, which is long for disposable mail and still not permanent.
How is a temp mail API different from a secure email API?
A temp mail API receives mail into disposable inboxes. A secure email API usually means an API that sends email, or an enterprise security tool that watches a company's mailboxes. They share the words "email" and "API" and almost nothing else — the secure email API guide on this site covers the sending side in detail.
The short version
A temp mail API turns a disposable inbox into three HTTP requests: create, read, delete. I ran it live — one GET to GuerrillaMail returned a working address, and its inbox already held a welcome email seconds later. The free keyless options are real and usable, with lifetimes from two hours to a day and code extraction on the better ones; the paid tiers buy you privacy, longer lifetimes, and higher creation limits. TempoMailUSA's own API documents eight endpoints under /v1/ with key authentication and webhook support, for teams that want the same capability on this site's infrastructure. Before you build on any of them, check the lifetime against your test, check whether the inbox is private, and remember the two hard limits: the API cannot send mail, and an inbox that expires takes the account you made with it. Use it for the test, delete it when you are done, and never build anything permanent on an address designed to disappear.
Need a disposable temporary email?
Protect your real inbox from spam and promotional clutter instantly and free.
Received a suspicious email, text, or charge alert?
Verify whether the sender domain is disposable, spoofed, or unverified before clicking links.
