Ephemeral Email API
for Automated Testing

Receive-only email inboxes for CI/Playwright tests. Perfect for magic-link authentication flows and email verification testing.

// Simple fetch-based integration
const API_URL = process.env.EPHEMAIL_API_URL;
const API_KEY = process.env.EPHEMAIL_API_KEY;

// Create temporary inbox
const inbox = await fetch(`${API_URL}/inboxes`, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ expiresInSeconds: 1800 }),
}).then(r => r.json());

// Poll for email with magic link
let message = null;
for (let i = 0; i < 10; i++) {
  const messages = await fetch(`${API_URL}/inboxes/${inbox.id}/messages?limit=1`, {
    headers: { 'Authorization': `Bearer ${API_KEY}` },
  }).then(r => r.json());
  
  if (messages.length > 0 && messages[0].subject?.includes('magic link')) {
    message = messages[0];
    break;
  }
  await new Promise(r => setTimeout(r, 2500));
}

// Extract and use magic link
const magicLink = message.htmlBody.match(/href=["'](https?:\/\/[^"']*magic[^"']*)["']/)?.[1];
await page.goto(magicLink);

Fast & Simple

Create disposable email addresses instantly. Long-polling API for real-time email delivery.

Secure & Isolated

Each inbox is completely isolated. Automatic cleanup with configurable TTL.

Developer Friendly

TypeScript SDK with full type safety. Works seamlessly with Playwright and Cypress.

Built for E2E Testing

Designed specifically for testing magic-link authentication, email verification flows, and password resets in automated test suites.

  • Receive-only: No outbound email sending (secure testing)
  • Long-polling API with configurable filters
  • Magic link extraction with built-in Descope support
  • AWS native: Lambda, DynamoDB, SES, S3

Ready to get started?

Read the Documentation