Getting Started
Set up your first inbox in under a minute.
Quick start
- Open the inbox and click Create temporary inbox.
- Copy the address from the top bar.
- Send mail to it from any app.
- 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:
- Sign up and open Domains → Add domain.
- Enter your domain. We issue a verification token immediately.
- 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.
- 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):
| Type | Name | Value | Purpose |
|---|---|---|---|
| TXT | _tempmail.yourdomain.com | tempmail-verify=<token> | Proves you own the domain |
| MX | @ | 10 mx.mbox.dev | Routes 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"
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /domains | List active domains |
| POST | /accounts | Create an inbox |
| POST | /token | Login |
| GET | /me | Account info |
| GET | /messages | Inbox listing |
| GET | /messages/:id | Full message + body + attachments |
| PATCH | /messages/:id | Mark seen / unseen |
| DELETE | /messages/:id | Delete |
| GET | /sources/:id | Raw RFC 822 |
| GET | /messages/:id/attachments/:aid/download | Stream 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));