MailDomainsAPIWallet

Developer API & Webhooks

Automate disposable inbox creation, instant OTP & magic-link extraction for E2E test suites, programmatic domain registration, and HMAC-SHA256 webhooks.

REST API Keys

Authenticate requests with Authorization: Bearer flx_live_...

Sign in to generate scoped API keys.

Playwright / Node.js E2E OTP Example

// Playwright / Vitest E2E OTP Authentication Example
const API = 'http://localhost:3000/api/v1';
const headers = {
  Authorization: 'Bearer flx_live_YOUR_API_KEY',
  'Content-Type': 'application/json',
};

// 1. Provision an instant disposable inbox
const { inbox } = await fetch(`${API}/inboxes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ ttlMinutes: 30 }),
}).then((r) => r.json());

// 2. Trigger sign-up in your application under test using inbox.address
await page.fill('input[name="email"]', inbox.address);
await page.click('button[type="submit"]');

// 3. Long-poll /wait — resolves within milliseconds of SMTP arrival!
const { message } = await fetch(
  `${API}/inboxes/${inbox.id}/wait?timeoutMs=15000`,
  { headers }
).then((r) => r.json());

console.log('Extracted OTP:', message.extractedOtp);
await page.fill('input[name="otp"]', message.extractedOtp);

REST API v1 Endpoints

POST/api/v1/inboxes
Create disposable or custom-domain inbox
GET/api/v1/inboxes
List active inboxes & usable domains
GET/api/v1/inboxes/:id/messages
List messages in inbox
GET/api/v1/inboxes/:id/wait?timeoutMs=15000
Long-poll until email arrives + extract OTP
GET/api/v1/messages/:id
Fetch full parsed MIME, headers & attachments
POST/api/v1/messages/send
Send outbound RSA-2048 DKIM-signed email
GET/api/v1/domains/search?q=brand
Search domain availability & pricing
POST/api/v1/domains/register
Purchase domain & auto-provision MX/DKIM DNS

Recent Webhook Deliveries (0)

Configure a webhook URL on any inbox to stream signed JSON payloads on incoming mail.