# Email testing API for CI, signup flows, and notification checks

Use an email testing API to create inboxes, wait for messages, and assert links, codes, attachments, and content in release-critical workflows.

Email testing API

MailSlurp gives teams a programmable way to create inboxes, wait for matching messages, and validate signup, OTP, password reset, invite, and notification emails in code.

[Start free](https://app.mailslurp.com/sign-up/?onboardingRequest=testing) [Talk to sales](https://www.mailslurp.com/sales/schedule/)

![Email testing API workflow](https://assets-cdn.mailslurp.com/image-variants/1920/mj/product-email-testing-api-hero.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

Trusted by top companies worldwide

- ![Broadcom](https://www.mailslurp.com/assets/companies/broadcom.svg)
- ![Scraper](https://www.mailslurp.com/assets/companies/scraper.svg)
- ![Trivago](https://www.mailslurp.com/assets/companies/trivago.svg)
- ![Avast](https://www.mailslurp.com/assets/companies/avast.svg)
- ![Wolt](https://assets-cdn.mailslurp.com/image-variants/340/assets/companies/wolt.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)
- ![Panasonic](https://www.mailslurp.com/assets/companies/panasonic.svg)

```
import { test, expect } from "@playwright/test";
import { MailSlurp } from "mailslurp-client";

test("sign up with email OTP", async ({ page }) => {
  const mailslurp = new MailSlurp({ apiKey: process.env.MAILSLURP_API_KEY! });
  const inbox = await mailslurp.createInbox();

  await page.goto("/signup");
  await page.getByLabel("Email").fill(inbox.emailAddress!);
  await page.getByRole("button", { name: "Create account" }).click();

  const email = await mailslurp.waitForLatestEmail(inbox.id!, 30000);
  const code = email.body!.match(/\b\d{6}\b/)![0];
  await page.getByLabel("Code").fill(code);
  await expect(page.getByText("Welcome")).toBeVisible();
});
```

Code-first checks

## Write the email assertion next to the user journey

Create an inbox for the test, trigger the signup or reset flow, wait for the delivered message, and assert the exact link, code, header, or attachment your customer depends on.

[Open wait API docs](https://www.mailslurp.com/docs/wait-for/)

Playwright email verification

## Read the received email inside the same Playwright test

Create a private inbox for the run, submit its address in Playwright, wait for the expected subject with a bounded API call, extract the delivered link or OTP, and delete the inbox during cleanup. Use the MailSlurp SDK alongside Playwright—no separate plugin is required.

[Read the Playwright guide](https://www.mailslurp.com/blog/playwright-email-testing/) [Open the complete example](https://www.mailslurp.com/examples/playwright-fake-email-test/)

![Playwright browser test using a private email inbox](https://assets-cdn.mailslurp.com/image-variants/1920/mj/lp-playwright-email-testing-hero-unique.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

Sandbox to CI

## Promote captured email into API assertions

Capture staging SMTP traffic in MailSlurp Email Sandbox, inspect the received payload, then use the same inbox and wait APIs to assert signup, password reset, OTP, billing, and notification messages in CI.

[Open email sandbox](https://www.mailslurp.com/product/email-sandbox/) [View webhooks](https://www.mailslurp.com/product/email-webhooks/)

![Email sandbox capture promoted to API assertions](https://assets-cdn.mailslurp.com/image-variants/1920/mj/product-email-sandbox-hero-unique.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

Deterministic waits

## Create inboxes per run and wait for the exact message

Replace shared inboxes and fixed delays with disposable test identities, bounded waits, and message matching by sender, subject, content, or unread state.

![Deterministic email wait and assertion workflow](https://assets-cdn.mailslurp.com/image-variants/1920/mj/product-platform-testing-panel.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

Payload assertions

## Extract links, codes, headers, and attachments directly

Validate the delivered message payload customers depend on instead of scraping inbox UIs or hand-rolling MIME parsing in each suite.

![Email message payload assertion workflow](https://assets-cdn.mailslurp.com/image-variants/1920/mj/product-email-testing-hero.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

## Email testing API workflows MailSlurp supports

Turn email checks into repeatable release coverage with programmable inboxes and high-signal assertions.

### Signup and invitations

Create an inbox, trigger your app flow, wait for the message, and assert the link and content.

[Read email in Playwright](https://www.mailslurp.com/blog/playwright-email-testing/)

### Password reset

Verify sender, subject, reset link, and timing before auth-related changes go live.

[Open auth testing](https://www.mailslurp.com/solutions/authentication-testing/)

### Transactional notifications

Use the same inbox automation for receipts, alerts, onboarding, product-event messages, and SMS-backed auth flows.

[Open SMS verification](https://www.mailslurp.com/mobile/sms-verification-api/)

### Attachments and headers

Inspect files, recipients, MIME content, headers, links, and message metadata from code.

### Email sandbox

Capture staging SMTP traffic, inspect received payloads, and promote stable checks into API assertions.

[Open email sandbox](https://www.mailslurp.com/product/email-sandbox/)

### CI release checks

Keep inbox IDs and message IDs with failures so teams can debug and trust pipeline results.

[Open testing platform](https://www.mailslurp.com/product/testing/)

Integrate MailSlurp Seamlessly

[![Javascript](https://www.mailslurp.com/icons/javascript.svg)](https://www.mailslurp.com/developers/) [![Python](https://www.mailslurp.com/icons/python.svg)](https://www.mailslurp.com/developers/) [![CSharp](https://www.mailslurp.com/icons/csharp.svg)](https://www.mailslurp.com/developers/) [![Java](https://www.mailslurp.com/icons/java.svg)](https://www.mailslurp.com/developers/) [![Postman](https://www.mailslurp.com/icons/postman.svg)](https://www.mailslurp.com/developers/) [![PHP](https://www.mailslurp.com/icons/php.svg)](https://www.mailslurp.com/developers/) [![Ruby](https://www.mailslurp.com/icons/ruby.svg)](https://www.mailslurp.com/developers/) [![Playwright](https://www.mailslurp.com/icons/playwright.svg)](https://www.mailslurp.com/developers/) [![Selenium](https://assets-cdn.mailslurp.com/image-variants/340/assets/brands/icons/selenium.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)](https://www.mailslurp.com/developers/)

[![Javascript](https://www.mailslurp.com/icons/javascript.svg)](https://www.mailslurp.com/developers/) [![Python](https://www.mailslurp.com/icons/python.svg)](https://www.mailslurp.com/developers/) [![CSharp](https://www.mailslurp.com/icons/csharp.svg)](https://www.mailslurp.com/developers/) [![Java](https://www.mailslurp.com/icons/java.svg)](https://www.mailslurp.com/developers/) [![Postman](https://www.mailslurp.com/icons/postman.svg)](https://www.mailslurp.com/developers/) [![PHP](https://www.mailslurp.com/icons/php.svg)](https://www.mailslurp.com/developers/) [![Ruby](https://www.mailslurp.com/icons/ruby.svg)](https://www.mailslurp.com/developers/) [![Playwright](https://www.mailslurp.com/icons/playwright.svg)](https://www.mailslurp.com/developers/) [![Selenium](https://assets-cdn.mailslurp.com/image-variants/340/assets/brands/icons/selenium.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)](https://www.mailslurp.com/developers/)

### Integrate with any framework

Official plugins and SDKs for all major programming languages, frameworks, and test platforms. All functionality available via API or dashboard.

![Flexible integration patterns](https://assets-cdn.mailslurp.com/image-variants/1024/assets/home/cicd.png?v=3ee63d9cb38e9dc88b833e756a9a34e88d711977)

### CI/CD Native

MailSlurp fits right into your existing development, testing, and CI/CD workflows. Deploy and iterate with confidence and actionable feedback.

[Developer Integrations](https://www.mailslurp.com/developers/)

## Email testing workflows at production scale

Emails processed

500 million+

Scale for CI, staging, and release checks.

Testing coverage

OTP + resets

Cover signup, password reset, magic-link, and notification flows.

Mature platform

10+ years

Stable APIs for long-running engineering test suites.
