@tempmail

Getting Started

Set up your first inbox in under a minute.

Quick start

  1. Open the inbox and click Create temporary inbox.
  2. Copy the address from the top bar.
  3. Send mail to it from any app.
  4. Watch it appear in real time.
That's it. Want addresses on your own domain or programmatic access? Read on.

Bring your own domain

Receive mail at [email protected] — we run the mail server, you keep the brand. The whole flow lives in the dashboard:

  1. Sign up and open Domains → Add domain.
  2. Enter your domain. We issue a verification token immediately.
  3. Click Log in to my DNS — if your registrar speaks Domain Connect (GoDaddy, Cloudflare, IONOS, …) the records get added with one click. Otherwise, paste the TXT + MX shown on the page into your DNS provider manually.
  4. Verification runs every minute; the page updates as soon as the records propagate.

For reference, the manual records look like this (the dashboard fills in the actual values for your domain):

TypeNameValuePurpose
TXT_tempmail.yourdomain.comtempmail-verify=<token>Proves you own the domain
MX@10 mx.mbox.devRoutes inbound mail to us

Behind Cloudflare? Leave both records as DNS-only (grey cloud). Cloudflare's HTTP proxy doesn't proxy SMTP, and turning it on for the verification TXT does no harm but isn't needed either.

REST API

The API surface mirrors mail.tm — existing clients (including @cemalgnlts/mailjs) work with just a baseUrl override.

# 1. List domains we host (plus any of your verified domains)
curl https://api.mbox.dev/domains

# 2. Create an inbox
curl -X POST https://api.mbox.dev/accounts \
  -H 'Content-Type: application/json' \
  -d '{"address":"[email protected]","password":"secret"}'

# 3. Get a token
curl -X POST https://api.mbox.dev/token \
  -H 'Content-Type: application/json' \
  -d '{"address":"[email protected]","password":"secret"}'

# 4. Read messages
curl https://api.mbox.dev/messages \
  -H "Authorization: Bearer $TOKEN"
MethodEndpointPurpose
GET/domainsList active domains
POST/accountsCreate an inbox
POST/tokenLogin
GET/meAccount info
GET/messagesInbox listing
GET/messages/:idFull message + body + attachments
PATCH/messages/:idMark seen / unseen
DELETE/messages/:idDelete
GET/sources/:idRaw RFC 822
GET/messages/:id/attachments/:aid/downloadStream attachment

Real-time SSE

No polling. Subscribe to the Mercure hub with the same JWT you got from /token:

const es = new EventSource(
  `https://mercure.mbox.dev/.well-known/mercure?topic=/accounts/${id}`,
  { headers: { Authorization: `Bearer ${token}` } }
);
es.onmessage = (e) => console.log("new mail:", JSON.parse(e.data));

Use the Mailjs client

Drop-in mail.tm client, point it at our API:

import Mailjs from "@cemalgnlts/mailjs";

const mailjs = new Mailjs({
  baseUrl: "https://api.mbox.dev",
  baseMercure: "https://mercure.mbox.dev/.well-known/mercure",
});

const acc = await mailjs.createOneAccount();
mailjs.on("arrive", (m) => console.log("new mail:", m.subject));