Disposable Email API — Temporary Inboxes for Email Testing
A temporary email API for developers. Create disposable inboxes via REST, receive messages, and test email flows programmatically. Email testing API for Cypress, Playwright, and Selenium — no mail server, no subscription.
How It Works
- Create inbox — POST /inbox to get a unique address like abc12xy89@sed.sh
- Trigger your email flow — use the address in signup forms, OTP, or verification flows
- Fetch and assert — GET /inbox/{code}/messages to read emails and verify content
Code Example
# Create a disposable inbox
curl -s -X POST https://sed.sh/api/inbox \\
-H "Authorization: Bearer YOUR_API_KEY" | jq .
# Response: { "code": "abc12xy89", "email": "abc12xy89@sed.sh" }
# Fetch messages
curl -s https://sed.sh/api/inbox/abc12xy89/messages \\
-H "Authorization: Bearer YOUR_API_KEY" | jq '.messages[0].subject'
Use Cases
- E2E testing signup flows — isolated inboxes per test run, no collisions
- OTP & magic link testing — intercept one-time passwords programmatically
- CI/CD pipeline testing — fresh inboxes per pipeline run, auto-cleanup
- Email verification testing — confirm verification emails arrive with correct links
- Newsletter unsubscribe testing — subscribe, send campaign, parse unsubscribe link
Disposable Email API vs Self-Hosted (Mailhog)
| Feature | sed.sh | Mailhog / smtp4dev |
|---|---|---|
| Infrastructure required | None | Docker or binary |
| Works in GitHub Actions | Yes | Requires service container |
| Tests real email delivery | Yes — real MX | No — localhost only |
| Parallel isolated inboxes | Yes | Requires per-worker config |
| Cost | $0.0012/email | Free (but ops cost) |
Pricing
| Provider | Price | Model |
|---|---|---|
| sed.sh | $0.0012/email | Pay per email, no subscription |
| MailSlurp | $19+/month | Monthly subscription |
| Mailosaur | $49+/month | Monthly subscription |
| Mailsac | $18+/month | Monthly for private inboxes |
| Mailinator | $159+/month | Public inboxes free, private paid |
Frequently Asked Questions
What is a disposable email API?
A disposable email API lets developers create short-lived email inboxes via HTTP. Create one per test run, trigger emails, then fetch and assert — all without a mail server.
What is the best disposable email API for developers?
sed.sh charges $0.0012/email with no monthly fee. A $10 deposit covers ~8,300 test emails. Private inboxes, real MX delivery, works in CI/CD.
How do I test emails in CI/CD?
Store your API key as a secret, create a fresh inbox per test worker via POST /inbox, trigger your app's email flow, then poll GET /inbox/{code}/messages to assert content.
How does sed.sh compare to Mailinator?
Mailinator has public inboxes anyone can read. sed.sh creates private, API-key-protected inboxes — suitable for testing sensitive flows like password resets and payment confirmations.