For developers

Temporary email API

Create inboxes and read messages from code: for sign-up autotests, checking mailings and email confirmations.

Authentication

Every request is signed with a key in the Authorization header. Keys are issued on paid plans.

Authorization: Bearer um_YOUR_KEY

Base URL

https://urusmail.pro/api/v1

Quick start

  1. Create an inbox
  2. Wait for a message (the request itself waits up to 30 seconds)
  3. Read the message: text, verification code and links
# 1. create an inbox
curl -X POST https://urusmail.pro/api/v1/inboxes \
  -H "Authorization: Bearer um_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ttl_minutes": 60}'
# -> {"inbox":{"id":123,"email":"swift.fox1234@urusmail.pro","expires_at":"..."}}

# 2. wait for a message (up to 30 s)
curl "https://urusmail.pro/api/v1/inboxes/123/messages?wait=30" \
  -H "Authorization: Bearer um_YOUR_KEY"
# -> {"messages":[{"id":456,"subject":"Your code","code":"482910", ...}]}

# 3. read the full message
curl https://urusmail.pro/api/v1/inboxes/123/messages/456 \
  -H "Authorization: Bearer um_YOUR_KEY"
const API = "https://urusmail.pro/api/v1";
const headers = { Authorization: "Bearer " + process.env.URUSMAIL_KEY, "Content-Type": "application/json" };

// create an inbox for one test
const { inbox } = await (await fetch(API + "/inboxes", { method: "POST", headers, body: JSON.stringify({ ttl_minutes: 30 }) })).json();

// ... your app sends a confirmation email to inbox.email ...

// wait for the email and take the code
let code = null;
for (let i = 0; i < 4 && !code; i++) {
  const { messages } = await (await fetch(`${API}/inboxes/${inbox.id}/messages?wait=30`, { headers })).json();
  code = messages[0]?.code ?? null;
}
console.log(inbox.email, code);

await fetch(`${API}/inboxes/${inbox.id}`, { method: "DELETE", headers });

Endpoints

GET/mePlan, limits and current usage
GET/domainsDomains you can create inboxes on
POST/inboxesCreate an inbox. Body: name, domain, ttl_minutes (all optional)
GET/inboxesList your inboxes
GET/inboxes/{id}A single inbox
DELETE/inboxes/{id}Delete an inbox with its messages
GET/messagesAll messages of the account in one list. Parameters: inbox_id, since_id, limit (up to 100)
GET/inboxes/{id}/messagesMessages in an inbox. Parameters: since_id, wait (0–30 seconds)
GET/inboxes/{id}/messages/{mid}Full message: text, html, code, links
DELETE/inboxes/{id}/messages/{mid}Delete a message
GET/custom-domainsYour domains and the DNS records they need
POST/custom-domainsAdd a domain. Body: domain, catch_all
POST/custom-domains/{id}/verifyCheck DNS records and enable mail reception
PATCH/custom-domains/{id}Turn catch_all on or off
DELETE/custom-domains/{id}Delete a domain and its inboxes

What a message contains

codeThe verification code if found next to words like "code" or "verification"; otherwise null
textMessage text. For HTML-only emails the text is built from the HTML without styles
htmlThe original HTML (render it only inside a sandboxed frame)
linksLinks from the message, up to 50

Custom domain

  1. Add a domain with POST /custom-domains. The response contains two DNS records.
  2. At your registrar, create the TXT record with the verification code and an MX record pointing to mail.urusmail.pro.
  3. Call /verify. Once both records are found, the domain appears in GET /domains and you can create inboxes on it.
  4. With catch_all, an email to any address on the domain creates an inbox by itself, if your plan allows.

Errors and limits

401Missing or invalid key
403The key is disabled or expired
404Inbox, message or domain not found (or not yours)
409Plan limit reached or the address is taken
429Per-minute request limit exceeded. Retry later (Retry-After header)

Errors always have the same shape:

{ "error": { "code": "inbox_limit", "message": "Inbox limit reached (10). Delete an inbox or upgrade the plan" } }

At most three requests per key can wait for a message at the same time. An inbox keeps the last 200 messages.

Pricing and getting a key