Insomnia is usually treated as an API client for REST and GraphQL endpoints. With MailSlurp, you can also use it as an email workflow test bench.

Instead of only checking that your app returns , you can verify the email that a real user would receive.

What you can test in one Insomnia workspace

  • Signup verification messages
  • Password reset links
  • OTP and MFA codes
  • Notification content and headers

Step 1: Import the MailSlurp OpenAPI spec

In Insomnia, import from URL:

This gives you ready-to-run request templates for inbox creation, waiting for emails, and message inspection.

Step 2: Configure environment variables once

Create an environment with at least:

Set in requests using the environment variable.

Step 3: Build a four-request test chain

Use operation names from the imported spec in this order:

  1. Trigger your application action (signup/reset) against your app API
  2. (or equivalent detail endpoint) and validate content

This pattern is enough to test most critical email journeys.

Example flow: signup verification

Request A: Create inbox

Run inbox creation and save returned values into environment variables.

Request B: Call your signup endpoint

Send to your app signup API.

Request C: Wait for email

Use the wait endpoint with timeout to avoid race conditions.

Request D: Inspect and assert

Check:

  • subject contains expected phrase
  • body includes verification link
  • sender domain is correct

Optional: add Insomnia test assertions

Insomnia supports test scripts on responses. Use them to fail fast when expected content is missing.

Avoid flaky email tests

  1. Create a fresh inbox per test run.
  2. Use explicit wait timeouts.
  3. Assert business outcomes (valid link/code), not only message existence.
  4. Record message IDs for troubleshooting.

Security and compliance checks inside the same flow

After core workflow assertions, add:

This prevents shipping a flow that works functionally but fails deliverability.

Use Insomnia for fast exploratory verification, then migrate critical checks into automated suites with Email Integration Testing and the Email Testing API.

If you need a full pre-release gate, use Email testing before you send.