TempMail.now API (unofficial, session-based)

TempMail.now has no formal API. But the website itself talks to a few plain HTTP endpoints, and you can call them from a script. This page documents those endpoints as they work today. There is no key, no sign-up, and nothing to install. All you need is curl and a cookie jar. Read the limits section before you build anything on it.

In short

Call GET /api/temp_email to get an address and a session cookie. Send that cookie with GET /fetch_emails to read the inbox. POST /change_email swaps the address. GET /generate_qr returns a QR code. It is receive-only, unofficial, and rate limited. Use it for personal scripts and tests, not for bulk sign-ups.

Get Your Temp Mail Now

Start sending anonymous emails in seconds - no registration required!

API

TempMail.now at a glance

CostFree, no account, no limits on inboxes.
Sign-upNone. An address is ready the moment the page loads.
Inbox lifetimeYou choose 5, 10, 15, 20, 25 or 30 minutes. The inbox then deletes itself.
ReceivingMessages, verification codes, links and attachments arrive in seconds.
SendingReceive-only. You cannot send or reply from a temporary address.
DomainsA rotating pool of domains. Use Change Email to get a different one if a site rejects yours.
Data retentionEmails are deleted automatically. Nothing is kept beyond the retention window described in our privacy policy.

How the session works

The API does not use keys. It uses a cookie. When you first call /api/temp_email, the server creates an inbox for you and sets a session cookie in the response. Every later call must send that cookie back. If you forget it, the server thinks you are a new visitor and gives you a different address.

With curl, the easy way is a cookie jar file. The -c flag saves cookies to the file, and -b reads them from it. Use both flags on every call so the jar stays up to date.

GET /api/temp_email: get an address

This is always the first call. It returns your current address, or creates one if you do not have one yet. The reply is JSON with three fields.

curl -c jar -b jar "https://tempmail.now/api/temp_email"

{"email": "abc123@example-domain.tld", "created_at": "2026-09-13T10:00:00", "duration_minutes": 10}

You can ask for a longer or shorter timer with the duration query parameter. Allowed values are 5, 10, 15, 20, 25, and 30 minutes. It only applies when a new address is created. If you already have a live address, the timer does not change.

curl -c jar -b jar "https://tempmail.now/api/temp_email?duration=30"
  • email is the full address to paste into a form.
  • created_at is when the address was made.
  • duration_minutes is how long the inbox lives from that time.

GET /fetch_emails: read the inbox

Call this to see what has arrived. It returns every message in the inbox, the seconds left on the timer, and the address the inbox belongs to.

curl -b jar -c jar "https://tempmail.now/fetch_emails"

{
  "emails": [
    {
      "id": 4821,
      "from_address": "noreply@some-site.tld",
      "subject": "Your code is 482913",
      "body": "...",
      "received_at": "2026-09-13T10:01:12",
      "token": "3f9a...c21e",
      "status": "unread",
      "attachments": [{"filename": "invoice.pdf"}]
    }
  ],
  "remaining_time": 540,
  "temp_email": "abc123@example-domain.tld"
}

The body field holds the message text. The token field is a link to the full message: open /en/view/ followed by the token in a browser to see it rendered with any attachments. The attachments list gives you the file names.

When the inbox timer has run out, the shape of the reply changes. Instead of an emails list, you get an info message and a fresh address. Your script should check for this and start over.

{"info": "Your inbox expired. A new address was created.", "temp_email": "xyz789@example-domain.tld"}

POST /change_email: get a new address

This throws away the current address and gives you a new one under the same session. The old inbox and its messages are gone at once. It is the same thing the Change Email button does on the website.

curl -X POST -b jar -c jar "https://tempmail.now/change_email"

{"new_email": "qrs456@example-domain.tld"}

GET /generate_qr: QR code for the address

This returns a PNG image of a QR code that holds your current address. It is handy for moving the address to a phone without typing it. Save the output to a file.

curl -b jar -c jar "https://tempmail.now/generate_qr" -o address.png

A full example: wait for a code

Here is the whole flow in one shell script. It gets an address, prints it so you can paste it into a form, then polls every 10 seconds until a message arrives.

#!/bin/sh
curl -s -c jar -b jar "https://tempmail.now/api/temp_email"
echo
for i in $(seq 1 30); do
  sleep 10
  out=$(curl -s -b jar -c jar "https://tempmail.now/fetch_emails")
  case "$out" in
    *'"subject"'*) echo "$out"; break ;;
  esac
done

Rate limits

Each client gets a fixed budget per minute:

  • /api/temp_email: 30 requests per minute
  • /fetch_emails: 120 requests per minute

Go over the budget and you get an error until the minute resets. There is no need to poll faster than every 5 seconds. The mail fetcher itself only checks the mailbox every few seconds, so faster calls just return the same result. To see how mail moves from the server to your inbox, read how temp mail works.

What this API is and is not

Please read this part. It sets the rules.

  • Unofficial. These are the endpoints the site uses. They may change without notice.
  • Receive-only. You cannot send, reply, or forward. There is no such endpoint.
  • No key, no account. The cookie is the only thing that ties calls together.
  • No guarantee. Do not build a product on it. Build a script for yourself.
  • For testing and personal automation. Good uses: checking your own sign-up flow, grabbing a code in a test run, or fetching a download link.
  • Not for bulk account creation. Making many accounts on other sites, sending spam, or hammering the endpoints gets your client blocked, and we do not lift blocks.
Tip: Treat the inbox as public. Do not send anything private to a temp address, and do not tie an account you care about to one. The whole inbox is deleted when the timer ends.

Messages and addresses are removed when the timer ends, and a cleanup job clears anything left over. Nothing is kept for later. The details are on our how we handle your data page and in the privacy policy.

Frequently asked questions

Do I need an API key?

No. There is no key and no sign-up. The first call to /api/temp_email sets a session cookie. Send that cookie back with every later call and the server knows which inbox is yours.

Can I send email through the API?

No. TempMail.now is receive-only. There is no endpoint for sending, replying, or forwarding, and there never will be. The API only creates an address, reads what arrives, and swaps the address for a new one.

What are the rate limits?

/api/temp_email allows 30 requests per minute per client. /fetch_emails allows 120 requests per minute per client. Going over returns an error until the minute resets. Polling every 5 to 15 seconds stays well within both.

Is the API stable?

It is unofficial. These are the same endpoints the website uses, so they work today, but field names or paths may change without notice. Write your script so a small change does not break it, and check this page when something stops working.

Can I use it to create accounts in bulk?

No. The API is for personal automation and testing, such as checking a sign-up flow or grabbing a code in a script. Bulk account creation, spam, and abuse get blocked at the network level, and the block is not lifted.

Related pages

Features Auto-Expiration Email Generator Anonymous Email Free Email Fake Email Temp Gmail Temp Mail Domains How Temp Mail Works FAQ Throwaway Email Test Email Dummy Email Burner Email Disposable Email Email Extractors Avoid Spam Stop Twitter Spam

From the blog

Deep Dive · 4 min

How Temp Mail Domains Get Blacklisted and Removed

How disposable domains land on blacklists, and the slow ways they can be cleaned off.

Deep Dive · 4 min

Data Retention Policies at Temp Mail Services Explained

How long temp mail services keep your messages, what else they might store, and why a short delete timer protects your privacy.

Deep Dive · 4 min

Why Email Providers Cannot Fully Block Temp Mail

The plain reasons blocklists and filters can never fully stop a fresh throwaway inbox.

All blog posts →