Programmable inbox API

Automate E2E email tests without the flakiness.

PostMX gives you disposable or reusable inboxes, push or poll delivery, and clean extraction for OTPs, magic links, password resets, and webhook-driven workflows.

No credit card. No shared inboxes. No cleanup scripts.

  • Playwright
  • Cypress
  • Pytest
  • Node.js
  • Python
  • Signed webhooks

Workflow snapshot

import { PostMX } from "postmx";

async function main() {
  const postmx = new PostMX(process.env.POSTMX_API_KEY!);

  const inbox = await postmx.createTemporaryInbox({
    label: "signup-test",
  });

  const message = await postmx.waitForMessage(inbox.id);
  console.log(message.otp);
}

main().catch(console.error);

Inboxes

Temporary or reusable

Delivery

Polling or signed webhooks

Extraction

OTP, links, headers, HTML, text

The point is simple: create an inbox, trigger the email, wait for the next message, and keep moving.

The problem

You do not own your inbox tests.

Shared addresses, brittle waits, and cleanup rituals make email flows drift right when they matter most.

No shared inbox chaos

Create a fresh inbox for each run instead of fighting stale messages, collisions, and manual cleanup.

No fake-email shortcuts

Exercise the same OTP, magic-link, and password-reset path your users actually see.

No fragile glue code

Use a focused API and SDKs instead of stitching inbox hacks, mail forwards, and cleanup jobs together.

How it works

From inbox to OTP in four moves

The loop is short, deterministic, and built to stay out of your way.

1

Create an inbox

Spin up a disposable inbox for a single test run or a reusable inbox for recurring automation.

2

Trigger your app's email

Send the OTP, verification email, password reset, or magic link exactly as your app normally would.

3

Await the delivery

Use the API, SDK, CLI, or signed webhooks to receive the next email without awkward polling loops.

4

Extract the useful part

Grab the code, link, headers, text, HTML, or raw content and finish the flow in CI.

Capabilities

Built for the flows that usually fail first

Lead with real jobs, not abstract infrastructure language.

OTP and MFA testing

Receive one-time passcodes in real inboxes and validate the full authentication journey end to end.

Magic-link sign in

Capture sign-in links automatically and continue the login flow without brittle mailbox workarounds.

Password reset testing

Verify reset emails, extract the recovery link, and complete the reset flow with confidence in CI.

Email-driven automation

Route incoming mail into your systems through signed webhooks once the testing wedge is in place.

Articles

Practical guides for the email flows teams actually ship

Short, search-friendly reads that show how PostMX fits into Playwright, Cypress, and first-time onboarding work.

Playwright OTP

How to automate email OTP verification in Playwright

Use a temporary inbox, wait for the next message, and assert the OTP without regex scraping or shared mailboxes.

Read article
Cypress Magic link

How to test magic link authentication in Cypress without mocking

Keep passwordless login honest by using a real inbox to capture the link, then continue the browser flow directly.

Read article
Getting started Inbox API

Getting Started with PostMX: The Developer’s Guide to Painless Email Testing

Learn the core PostMX flow, from temporary inboxes to OTP extraction and local debugging with the CLI.

Read article

Pricing

Pricing that stays clear at a glance

The limits below are rendered from one editable data block so the table stays easy to update later.

Current public limits

The table below matches the repo's active plan budgets.

Active inboxes, monthly message caps, and API request budgets are shown together so the limits are easy to scan.

API request budgets are enforced per account, and weekly budgets reset Monday at 00:00 UTC.

FAQ

Questions a serious buyer will ask

Keep this short, practical, and easy to scan.

What kinds of emails can I test with PostMX?

OTP emails, MFA flows, magic links, password resets, verification emails, and most app-generated transactional mail.

Can I create a fresh inbox for every test run?

Yes. Use disposable inboxes for isolated tests or reusable inboxes when you want stable addresses for recurring workflows.

Do I have to poll for emails?

No. You can poll when it's simple, or use signed webhooks for push-based workflows.

What can I extract from the message?

OTP codes, links, headers, plain text, HTML, and raw message content. Eligible Pro messages can also get optional AI enrichment fields like a short summary, category, sender name, reference ID, mentioned amount, urgency, and action-needed flags.

Is this only for testing?

No. The homepage leads with testing, but the same inbox and webhook primitives support inbound automation and production workflows too.

Start building today

Make email flows testable

Start with a real inbox, receive the next email, and ship OTP and magic-link flows with more confidence.

Pricing

Pricing at a glance

Scan inbox caps, message limits, and API request budgets without digging through a tall card wall.