How Temp Mail APIs Work for Developers in 2026 (and When You Don't Need One)
A temp mail API lets test code read a disposable inbox without a human. This guide compares Mail.tm, MailSlurp, Mailinator, Temp-Mail.io, Temp-Mail.org, Guerrilla Mail, and Tmailor's own API on free/trial status, auth, and limits — and shows when a UI is the faster tool.
Quick access
Key Takeaways
A temp mail API earns its keep most when a machine, not a person, must read the inbox — otherwise a UI is faster.
A temp mail API gives code programmatic access to a disposable inbox, so automated tests can read verification emails and OTPs without a human. The right choice depends on free-tier reality, auth, and rate limits — and sometimes the right choice is no API at all.
- The clearest free REST option is Mail.tm: no API key, a JWT for account endpoints, and a published 8 requests-per-second limit per IP.
- Guerrilla Mail also exposes a free public JSON API with no key; MailSlurp and Mailinator scale test automation on paid plans.
- Temp-Mail.io offers its API on premium only (authenticated with an
X-API-Keyheader); Temp-Mail.org's API is listed through RapidAPI, with pricing and auth left unverified here. - Pick by six things: a genuine free or trial tier, auth and secret handling, the rate limit under parallel runs, polling versus webhooks, HTML/attachment/raw-source support, and the retention window.
- Tmailor now runs its own Temp Mail API and MCP server: a free plan with 100 mailboxes every 30 days, paid plans billed per mailbox created (not per request) up to 2,000,000 mailboxes a month, and an MCP server so an AI agent can create an address and read its mail directly.
- It stays receive-only like Mail.tm and Guerrilla Mail — no send endpoint — so it fits OTP and verification-code reads, not MailSlurp-style two-way or SMS testing.
Temp Mail API Providers Compared (2026)
Seven options developers actually reach for, judged on free or trial access, auth, and rate limits.
For a quick pick by need: choose Mail.tm or Tmailor for free automated reads, MailSlurp or Mailinator for scaled test automation and CI, and Temp-Mail.io when you are adding a temp inbox to a product on a premium plan. Guerrilla Mail suits fast scripted throwaways, and Tmailor's MCP server suits an agent-driven test. The table maps each on the facts that decide integration work. For a broader, non-developer comparison, see our guide to the best temp mail by need.
Disclosure: Tmailor publishes this guide and is one of the seven providers compared below.
This is a documentation-based comparison, not a lab benchmark. Provider details were originally checked on July 7, 2026. Tmailor, MailSlurp, and Mail.tm were checked again on December 3, 2026; other providers' details may have changed since the original review. Confirm current pricing, authentication, and limits before building an integration.
| Provider | Free / trial API | Auth | Limit / retention note | Best for |
|---|---|---|---|---|
| Mail.tm | Yes — free REST, no key | JWT Bearer (account endpoints) | 8 requests/sec per IP (checked December 3, 2026) | Free automated inbox reads |
| Guerrilla Mail | Yes — public JSON | None (session cookie) | Rate limit not published; up to 20 messages per list call | Quick scripted throwaway reads |
| MailSlurp | Free API tier; paid plans and trials available | x-api-key header | Official pricing checked December 3, 2026: Free lists 100 inbox creations and 250 received emails per month; Starter is .99/month. Verify current limits and plan features before use. | Email and SMS test automation |
| Mailinator | Public free + Verified Pro + paid | Team API token (header or query) | Verified Pro: 10 MB, 10 emails/sec, 2,000/month, 60/day | Public or team QA inboxes |
| Temp-Mail.io | Premium only | X-API-Key header | Plus plan: 1,000 API requests/month; rate headers expose usage | Adding temp mail to an app or product |
| Temp-Mail.org | API via RapidAPI (verify) | Unverified | Pricing/auth/rate unverified; messages delete in 1–2 hours | Established brand with app and API |
| Tmailor | Yes — free plan, 100 mailboxes/30 days | Bearer API key; hosted MCP also supports OAuth | Billed per mailbox created, not per request; Free plan also caps at 30 requests/minute and 2,000/day, needs a 1-IP allowlist; paid plans accept any IP with only a per-minute rate limit | Receive-only OTP/verification reads; AI-agent-driven tests via MCP |
Mail.tm is the standout free option: its documentation states API access is free with no key, using an account and a JWT for protected endpoints, capped at 8 requests per second per IP. Message objects include text, HTML, and attachment fields, which is what you assert on. No outbound send endpoint appears in its official docs, so treat it as receive-focused.
Guerrilla Mail is genuinely open — a public JSON API with no key, where the client keeps a session cookie. It is ideal for a fast scripted throwaway, though HTML is filtered when fetched, list calls return at most 20 messages, and attachment or send support is not documented. Where it is stronger than Mail.tm is zero setup; where it is weaker is structured assertions on rich HTML.
MailSlurp supports test automation with inboxes, APIs, SDKs, and webhooks. Eligible paid plans add external sending, and paid phone numbers support SMS testing. Its published Free plan lists 100 inbox creations and 250 received emails per month as checked on December 3, 2026; plan allowances and features can change, so check the current pricing page before committing to a design.
Mailinator pioneered the public inbox and remains free and public for basic QA, with a Verified Pro plan that unlocks API access after verification (10 MB storage, 10 emails per second, 2,000 messages per month, 60 per day). Its strength is team QA at scale; its limitation is that public inboxes are readable by anyone, so private domains and higher caps require paid Business plans.
Temp-Mail.io exposes its API on premium only, authenticated with an X-API-Key header, and the Plus plan lists 1,000 API requests per month with rate-limit headers that report your usage. Message payloads include text, HTML, and attachments. It suits teams embedding disposable inboxes into a product rather than one-off tests.
Temp-Mail.org is a well-known brand whose API is routed through RapidAPI. The official overview shows JSON responses with body, subject, and attachments, and messages that delete within 1–2 hours, but its current pricing, auth model, and rate limits could not be verified from the accessible pages — confirm them directly before depending on it.
What a Temp Mail API Actually Does
The API turns a throwaway inbox into an endpoint your test code can create, poll, and read.
A temp mail API — also called a temporary email API or disposable email API — lets code create a disposable email address, then poll or subscribe to that inbox to read incoming messages as JSON: verification links, OTP codes, or receipts. Developers use programmatic temp email to automate signup and email-flow tests without a real mailbox or a person clicking through a browser.
The core loop is consistent across providers: create an address, wait for delivery, fetch the message list, read the body and headers, and often extract a token or link with a regular expression. Integration comes in two styles. Polling means your code requests the inbox on an interval, which is simple to run inside continuous integration. A webhook means the provider posts the message to an endpoint you host, which is efficient but needs a public URL to receive the callback.
What you assert on is usually the subject, the sender, the HTML body, a token embedded in the message, and sometimes the delivery latency. A provider that exposes raw source and attachment fields lets you write stricter assertions than one that only returns filtered text.
When You Need an API — and When a UI Is Faster
Reach for an API only when no human reads the inbox; otherwise the web app or app already does the job.
You need a temp mail API when an automated suite must read the inbox with no human present — headless CI runs, browser-driven end-to-end tests, load tests, or scheduled monitors. When a person is testing a signup flow, a temp mail website or app is faster and needs no key, rate limit, or maintenance. Match the tool to who reads the inbox.
Reach for an API when the reader is code: headless continuous integration, browser-driven end-to-end tests that parse the inbox in code, nightly regression, synthetic monitoring, load and soak tests, or many inboxes running in parallel. Keep this scoped to your own apps, staging environments, and authorized QA — a temp mail API is for testing systems you control, not for signing up to third-party services at scale. The deeper mechanics of wiring an inbox into a build live in our guide to temp mail in CI/CD pipelines.
Prefer a UI or app when a human is in the loop: manual exploratory QA, a tester following a script, or a one-off signup check someone is watching. A person reading a browser tab does not need a key to rotate or a rate limit to respect. For how testers structure this work, see how QA teams use temp mail, and for governance in regulated environments, the OTP risk checklist for QA.
One caution: do not treat a temp mail website as an automation surface to scrape. If code must read the inbox — including a browser-driven end-to-end suite — use a provider with a documented API rather than automating clicks against a UI that was built for people.
How to Choose a Temp Mail API
Six questions decide the pick before you write a line of integration code.
Choose a temp mail API by answering six questions: Is there a genuine free or trial tier for your test volume? How do you authenticate and rotate the key? What is the rate limit under parallel runs? Do you poll or receive webhooks? Can it read the HTML, links, attachments, and raw source you assert on? And does it retain messages long enough for a slow OTP?
Free or trial tier versus your volume
Match the plan to how many inboxes and messages your suite creates. Mail.tm and Guerrilla Mail are free to read; MailSlurp's durable use is paid; Mailinator's Verified Pro allows a metered free quota after verification.
Auth and secret handling
Know whether you pass an API key, a bearer token, or a session cookie, and store it as a CI secret — never commit a key to the repository.
Rate limits under parallelism
A limit like Mail.tm's 8 requests per second is generous for one job but tight across many parallel runners, so plan backoff and retries.
Polling versus webhooks
Polling is simple inside CI; webhooks are efficient but require a public URL your test environment can expose.
Message shape
Confirm the provider returns the HTML, links, attachments, and raw source your assertions need — an email testing API that only returns filtered text limits what you can verify.
Retention window versus OTP latency
Short retention can delete a message before a slow verification code arrives, so check the window against real delivery times; our note on domain rotation and OTP reliability explains why delivery varies.
Developers usually reach for these APIs from a specific stack, so map the choice to your runtime: Node.js and Python have client libraries or plain HTTP; Playwright, Cypress, and Selenium suites call the API between browser steps; a small webhook receiver handles push delivery; and CI secrets hold the key. The API answers "read this inbox from code" — the browser tool still drives the UI, and the two meet at the assertion.
Where Tmailor's Own API Fits
Tmailor now runs a receive-only API and MCP server, priced per mailbox instead of per request.
Tmailor publishes a receive-only Temp Mail API with SDKs for Python, Node.js, and PHP, plus an MCP server for compatible AI agents. Its mailbox allowance counts addresses created: listing addresses, checking an inbox, and reading or deleting messages do not consume that allowance. The Free plan includes 100 mailboxes every 30 days, up to 30 requests per minute, and 2,000 requests per day. Paid plans include 3,000 to 2,000,000 mailboxes every 30 days and have per-minute limits but no daily or monthly request quota.
The Free plan requires an allowlisted calling IP; paid plans accept API calls from any IP. The hosted MCP endpoint requires an active paid plan and supports OAuth sign-in in compatible clients or an API key. The open-source local server (uvx tmailor-mcp) works on every plan, uses an API key, and requires the calling computer's IP to be allowlisted on Free. Agents can create and inspect mailboxes, wait for and read messages, delete addresses, and check account information. Our guide to wiring the MCP server into a Playwright test walks through the workflow.
The limits matter: the API is receive-only, so it cannot send test email or stand in for MailSlurp's two-way or SMS testing; attachments are not delivered; and messages are kept for 24 hours. Creating many short-lived addresses consumes the mailbox allowance faster than reusing addresses, while polling remains subject to request limits. Compare the expected workload against each provider's pricing and quotas. For a human tester, Tmailor also offers address reuse across sessions; see reuse a temp mail address.
Limitations and Risks of Temp Mail in Automated Tests
Disposable inboxes are for low-stakes test data, not for anything you must keep or secure.
Temp mail speeds up email testing, but it carries constraints worth designing around before they surprise a pipeline. Treat these as guardrails, and read the fuller picture in our overview of temp mail limits and risks.
- Messages auto-expire on short windows, so never store anything a later test step needs long-term.
- Some target sites block disposable domains, so a verification code may not arrive — have the test report a missing-message outcome with a timeout rather than retrying indefinitely against a policy block.
- Public or shared inboxes, such as Guerrilla Mail and public Mailinator, are readable by anyone who knows the address — never route real secrets through them.
- Do not use temp mail for accounts that hold real value or require identity verification; those belong on a permanent, controlled mailbox.
Frequently Asked Questions
Is the Mail.tm API free for developers?
If you need a temp mail API free of provider API keys, the Mail.tm API is the clearest documented starting point: no provider API key and an 8 requests-per-second per-IP limit. Guerrilla Mail is also free public JSON. Mailinator has public free inboxes plus Verified Pro, while Temp-Mail.io requires premium and Temp-Mail.org needs direct RapidAPI verification.
Does Tmailor have an API for developers?
Yes. Tmailor offers a receive-only Temp Mail API and an MCP server for AI agents. Its Free plan includes 100 mailbox creations every 30 days, subject to request limits and a one-IP allowlist. It does not send email or provide SMS testing.
What is the best temp mail API for CI/CD?
It depends on the criterion. For free automated reads, Mail.tm is one starting point. Tmailor also has a free receive-only API plan. MailSlurp supports outbound email and SMS on eligible plans, while Mailinator supports automated email receipt and SMS testing. Match each plan's capabilities, authentication, and limits to your pipeline.
What API can receive OTP codes in tests?
For an API to receive OTP in tests, use a documented provider that returns message bodies or HTML to your test code, then parse the code with retries and a timeout. Keep this scoped to your own signup flows, staging environments, and authorized QA because disposable-domain delivery is never guaranteed.
Should I use polling or webhooks?
Polling is simpler to run inside continuous integration because it needs no inbound endpoint. Webhooks are more efficient because the provider pushes messages to you, but they require a public URL your test environment can expose. Choose polling for isolated CI jobs and webhooks when you already host a receiver.
What is a MailSlurp alternative for temp mail API testing?
For free REST reads, Mail.tm is the closest alternative. For public or team QA inbox patterns, Mailinator fits, and for premium app or product integration, Temp-Mail.io works. Each differs on sending, attachments, and quotas, so verify the limits that matter to your suite before switching.
Can I send email from a temp mail API?
Most temp mail is receive-only, so it cannot send. Test-focused platforms such as MailSlurp add outbound email, and Mailinator lets subscribers route messages into private domains, which is different from sending from an address. Confirm send support per provider before you rely on it.
Are temp mail APIs allowed by the sites I test?
Use them for your own signup flows, staging environments, and authorized QA, where you control the system under test. Signing up to third-party services at scale can violate their terms, so check each platform's rules and keep temp mail testing to workflows you own.
The Bottom Line
A temp mail API earns its keep when automation must read the inbox. Mail.tm, Guerrilla Mail, and Tmailor's free plan are no-cost starting points for receive-only reads; Tmailor also offers an MCP server for agent-driven tests. For outbound email testing, consider a MailSlurp plan that includes sending. Mailinator supports automated email receipt and SMS testing. For manual QA, a UI service needs no API key. Check current plans and limits before you build, and when you just need an inbox to click through, create a free temp mail.

Jordan Mills has covered disposable email, OTP delivery and online privacy since 2018. He writes Tmailor's guides on staying anonymous, avoiding spam, and getting verification codes to land every time.