Quickstart
Every endpoint lives under https://dummyinbox.com/api/v1 and answers in JSON. There is no key to
get and nothing to set up. With curl and jq:
# Get a fresh address
ADDRESS=$(curl -s -X POST https://dummyinbox.com/api/v1/inboxes | jq -r .address)
# Send an email to $ADDRESS, then wait up to 30 seconds for it
ID=$(curl -s "https://dummyinbox.com/api/v1/inboxes/$ADDRESS/messages?wait=30" | jq -r '.messages[0].id')
# Read the whole message
curl -s "https://dummyinbox.com/api/v1/inboxes/$ADDRESS/messages/$ID" | jq '.message | {subject, text}'
Example test
Sign up with a fresh address and read the verification code. With a new address per test, no other
run's mail can get in the way, so you don't need since.
// Node 18+, inside an async test or an ES module.
const API = 'https://dummyinbox.com/api/v1';
async function api(path, options) {
const res = await fetch(API + path, options);
const body = await res.json();
if (!res.ok) throw new Error(`DummyInbox ${res.status}: ${body.error}`);
return body;
}
// One fresh address per test, so parallel runs never share an inbox.
const { address } = await api('/inboxes', { method: 'POST' });
await signUp(address); // your app sends the verification email
// Each call waits up to 30 seconds; give up after two minutes.
let messages = [];
for (let i = 0; i < 4 && messages.length === 0; i++) {
({ messages } = await api(`/inboxes/${address}/messages?wait=30`));
}
if (messages.length === 0) throw new Error('No email arrived');
const { message } = await api(`/inboxes/${address}/messages/${messages[0].id}`);
const code = message.text?.match(/\b\d{6}\b/)?.[0];
There is no endpoint that pulls out codes or links. Match them in text or
html yourself.
Endpoints
Inboxes need no setup: every address at an accepted domain already exists. Put the address in the path
as it is; @ needs no encoding.
List domains
GET /api/v1/domains
Domains you can use in an address. They all behave the same way.
curl https://dummyinbox.com/api/v1/domains
{
"domains": [
"dummyinbox.com"
]
}
Errors: 429
Create a random address
POST /api/v1/inboxes
Returns a new address that is hard to guess. Nothing is stored: every valid address already works, so this only saves you picking a name. Use one per test run.
| Name | Type | Description |
|---|---|---|
domain
body · optional
|
string | One of the domains from /domains. Defaults to the first one. |
curl -X POST https://dummyinbox.com/api/v1/inboxes
{
"address": "[email protected]",
"domain": "dummyinbox.com",
"webUrl": "https://dummyinbox.com/email/[email protected]"
}
Errors: 400, 429
List messages
GET /api/v1/inboxes/{address}/messages
Newest first, without bodies. With wait, the request stays open until a message arrives when none match yet.
| Name | Type | Description |
|---|---|---|
address
path
|
string | A full address at one of the domains from /domains. Any name works except reserved ones such as admin. |
limit
query · optional
|
integer |
Messages per page.
Default 10.
|
skip
query · optional
|
integer |
Messages to skip, for paging.
Default 0.
|
since
query · optional
|
date-time | Only messages received after this time. Pass the receivedAt of the newest message you have seen. Needs a timezone; URL-encode a + offset as %2B. |
wait
query · optional
|
integer |
Seconds to wait for a message when none match yet, up to 30. Returns as soon as one arrives.
Default 0.
|
curl "https://dummyinbox.com/api/v1/inboxes/[email protected]/messages?wait=30"
{
"messages": [
{
"id": "6716c0e2a4b9f3d1c8e5a702",
"from": "[email protected]",
"fromName": "Example App",
"to": [
"[email protected]"
],
"cc": [],
"subject": "Your Example App code",
"snippet": "Your verification code is 482913. It expires in 10 minutes.",
"receivedAt": "2026-10-21T09:41:07.000Z",
"attachmentCount": 1
}
],
"total": 1
}
Errors: 400, 429
Get a message
GET /api/v1/inboxes/{address}/messages/{id}
The whole message: text and HTML bodies, attachments and the raw source. The id only works with the address the message was delivered to.
| Name | Type | Description |
|---|---|---|
address
path
|
string | A full address at one of the domains from /domains. Any name works except reserved ones such as admin. |
id
path
|
string | The id from the message list. |
curl https://dummyinbox.com/api/v1/inboxes/[email protected]/messages/6716c0e2a4b9f3d1c8e5a702
{
"message": {
"id": "6716c0e2a4b9f3d1c8e5a702",
"from": "[email protected]",
"fromName": "Example App",
"to": [
"[email protected]"
],
"cc": [],
"subject": "Your Example App code",
"snippet": "Your verification code is 482913. It expires in 10 minutes.",
"receivedAt": "2026-10-21T09:41:07.000Z",
"attachmentCount": 1,
"text": "Your verification code is 482913. It expires in 10 minutes.\n",
"html": "<p>Your verification code is <strong>482913</strong>. It expires in 10 minutes.</p>",
"attachments": [
{
"filename": "getting-started.pdf",
"contentType": "application/pdf",
"size": 48213,
"url": "https://static-files.dummyinbox.com/emails/attachments/3f6c2a9e-8b41-4d7e-a5c3-9e0b7d21f846/0/getting-started.pdf"
}
],
"rawUrl": "https://static-files.dummyinbox.com/emails/raw/3f6c2a9e-8b41-4d7e-a5c3-9e0b7d21f846.eml"
}
}
Errors: 400, 404, 429
Message fields
The list returns summaries. Getting one message adds its bodies, attachments and raw source.
Summary
| Name | Type | Description |
|---|---|---|
id
|
string | Message id. Fetch the full message with it and the same address. |
from
|
string | Sender address from the From header. |
fromName
|
string | null | Sender display name, if any. |
to
|
string[] | Addresses in the To header. Yours is missing if you were Bcc’d. |
cc
|
string[] | Addresses in the Cc header. |
subject
|
string | Subject line, or empty. |
snippet
|
string | Start of the body as plain text, up to 200 characters. |
receivedAt
|
date-time | When DummyInbox received it. Messages are deleted 48 hours later. |
attachmentCount
|
integer | Number of attachments. |
Added in the full message
| Name | Type | Description |
|---|---|---|
text
|
string | null | Plain-text body, or null if there is none. |
html
|
string | null | HTML body, or null if there is none. It is untrusted: sandbox it before rendering. |
attachments
|
Attachment[] | Attachments, in message order. |
rawUrl
|
string | null | The original message as an .eml file. |
Attachment
| Name | Type | Description |
|---|---|---|
filename
|
string | File name, with unsafe characters replaced by _. |
contentType
|
string | MIME type. |
size
|
integer | Size in bytes. |
url
|
string | null | Download link. Anyone with the link can open it. |
Limits and rules
60 requests a minute
Per IP address. Every response carries RateLimit headers, and a 429 also carries Retry-After.
Waits of up to 30 seconds
Use wait instead of polling in a loop. Each IP can keep 10 waits open at once, and a wait counts as one request.
Messages last 48 hours
After that they are deleted automatically.
Receive-only
The API reads mail. It cannot send, delete or change messages.
Inboxes are public
Anyone who knows an address can read it, and attachment links work for anyone who has them. Use random addresses, and keep them out of public CI logs.
Works from any website
CORS is open to every origin, so your own pages can call it straight from the browser. No cookies or credentials are involved, and each visitor counts against their own IP limit.
Errors
Errors use the HTTP status code and a JSON body with a single error message.
{
"error": "limit must be an integer from 1 to 50"
}
| Status | When |
|---|---|
400 |
The address, a query parameter or the body is invalid. The message says which. |
404 |
No such message in this inbox (it may have expired), or no such endpoint. |
429 |
More than 60 requests a minute, or more than 10 open waits, from one IP. Retry after the number of seconds in Retry-After. |
500 |
Something failed on our side. Retry with backoff. |
OpenAPI spec
Everything above in machine-readable form, for Postman, code generators and AI agents. Version 1 only ever adds fields and endpoints; anything that would break a client ships as v2.