Email API for Automated Testing
Create temporary inboxes, receive emails, auto-extract OTP codes. One API call in your Playwright, Cypress, or Selenium tests.
// Create inbox
const inbox = await fetch('https://mcatch.dev/api/inboxes', {
method: 'POST',
headers: { 'X-API-Key': process.env.MAILCATCH_KEY }
}).then(r => r.json());
// Use inbox.address for signup
await page.fill('#email', inbox.address);
await page.click('#submit');
// Wait for OTP email
const msg = await fetch(
`https://mcatch.dev/api/inboxes/${inbox.id}/wait`
).then(r => r.json());
// msg.otp_code = "482913" ✓
await page.fill('#otp', msg.otp_code);Everything you need for email testing
Stop creating Gmail accounts for tests. MailCatch gives you programmatic email in seconds.
Instant Inboxes
Create a unique email address with one API call. Each test gets its own inbox.
Auto OTP Parsing
We extract verification codes from emails automatically. No regex needed.
Long Polling
Wait for emails with a single request. No polling loops in your test code.
Webhooks
Get notified instantly when an email arrives. Perfect for async workflows.
CI/CD Ready
Works in GitHub Actions, GitLab CI, Bitbucket Pipelines. Just add your API key.
Dashboard
View all inboxes, messages, and usage in a clean web interface.
Works with your test framework
Add email testing to your existing tests in minutes.
import { test, expect } from '@playwright/test';
test('user signup with OTP', async ({ page, request }) => {
// 1. Create inbox
const inbox = await request.post('https://mcatch.dev/api/inboxes', {
headers: { 'X-API-Key': process.env.MAILCATCH_KEY }
}).then(r => r.json());
// 2. Fill signup form
await page.goto('https://myapp.com/signup');
await page.fill('#email', inbox.address);
await page.fill('#password', 'TestPass123!');
await page.click('#submit');
// 3. Wait for verification email
const message = await request.get(
`https://mcatch.dev/api/inboxes/${inbox.id}/wait`
).then(r => r.json());
// 4. Enter OTP
await page.fill('#otp-input', message.otp_code);
await page.click('#verify');
await expect(page.locator('#welcome')).toBeVisible();
});Simple, transparent pricing
Start free. Upgrade when you need more.
Free
For personal projects and getting started
Get Started- 100 inboxes/month
- 1 API key
- 24h message retention
- Auto OTP parsing
- Long polling
Pro
For professional QA engineers and teams
Start Pro Trial- 5,000 inboxes/month
- 5 API keys
- 7 days message retention
- Webhooks
- Priority support
- Custom inbox prefix
Team
For QA teams and CI/CD pipelines at scale
Contact Us- 50,000 inboxes/month
- Unlimited API keys
- 30 days message retention
- Webhooks
- Priority support
- Custom domain
- Team management