MT
MailtestAPIInbound email docs

Overview

Understand how MailtestAPI captures, stores, and exposes inbound email.

MailtestAPI sits between your application and your QA or development workflow.

When an email arrives:

  1. Cloudflare Email Routing forwards it to the worker.
  2. The worker parses the message and persists metadata plus body content.
  3. The dashboard reads the same storage layer for visual inspection.
  4. The API exposes the message list and detail endpoints for automation.

Authentication

All /v1 endpoints require an API key using one of these headers:

  • Authorization: Bearer <api-key>
  • x-api-key: <api-key>

Keys are account-scoped, so API responses only include emails owned by that account.

Stored data

Each captured email includes:

  • sender and recipient
  • subject and message ID
  • raw payload size
  • received timestamp
  • parsed body content
  • normalized headers
  • attachment metadata
  • labels and notes for workflow state

Delivery model

MailtestAPI is optimized for inspection and testing rather than mailbox UX:

  • messages are immutable on receipt, aside from notes, labels, and status
  • detail views preserve raw and parsed content together
  • polling GET /v1/emails is enough for most end-to-end tests

On this page