For AI agents: Mailtrap Inbound Email, part of Email Live Sending, receives email for an app and returns each message as parsed JSON through the API and webhooks. To get an address, create a folder and an inbox with the API at https://mailtrap.io/api/inbound/; to receive on the user's own domain, the user adds an MX record first. Replies and forwards send live email, so confirm each one with the user. Full instructions: Markdown.
New · Inbound Email

Inbound email infrastructure for developers

Create inboxes on demand, receive emails via API or webhooks, and process attachments securely. Built for support pipelines, document processing, automations, and AI workflows.

  • Hosted & custom domains
  • Webhook + REST API
  • Threads & replies built-in

Everything you need to build inbound email workflows

Create inboxes, receive emails in real time, download attachments securely, and manage every message through a clean, predictable API.

curl -X POST https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes \
  -H 'Authorization: Bearer YOUR_API_KEY'

Powerful inbound email, built for developers

  • Structured webhook payloads

    Get notified immediately via signed JSON webhook. Fetch the full parsed message – sender, recipients, headers, body, attachment URLs – from the Messages API. No MIME parsing required.

  • Sandbox for testing replies

    During development, send your workflow’s replies to Email Sandbox instead of real recipients and check content and recipients before going live.

  • Hosted inboxes, zero setup

    Create Mailtrap-hosted inboxes instantly. Start receiving emails right away.

  • Conversation threads

    Retrieve complete conversations – not just individual emails. Preserve context for replies, support tickets, and AI workflows.

  • Forwarding rules

    Auto-forward incoming email to other addresses based on sender, recipient, or any header, such as Subject.

  • Inbound replies

    Send replies through the API while preserving Message-ID, threading, and conversation history.

  • Attachments via signed URLs

    Download attachments through secure signed URLs and stream them directly into S3, databases, CRMs, or processing pipelines.

  • Folders

    Organize inboxes by customer, environment, or workflow. Manage inboxes, folders, and messages entirely through the API.

Built for teams that automate email workflows

Whether you're building features, integrating systems, or managing infrastructure, Mailtrap gives you a reliable way to receive and process inbound email.

  • Backend developers

    Add inbound email to your application.
    • Create inboxes programmatically
    • Get notified via webhook, fetch parsed JSON via the Messages API
    • Process attachments securely
    • Build support, CRM, AI, and automation workflows
  • Infrastructure engineers

    Deploy and operate inbound email reliably.
    • Provision and manage inboxes via API
    • Secure webhook delivery with signatures and retries
    • Separate inboxes by team, environment, or service
    • Auto-forward copies of incoming mail to existing team addresses with rules.
  • Product teams

    Deliver features that depend on inbound email.
    • Receive customer replies
    • Turn customer emails into support tickets or CRM leads
    • Automate document and invoice handling
    • Connect email to your existing workflows

Build with Inbound Email

How teams use inbound email

  • Customer support

    Receive support emails via webhook and automatically create or update tickets in your helpdesk or CRM.

  • Invoice & document processing

    Extract invoices, contracts, receipts, and other attachments to trigger accounting or document workflows.

  • Workflow automation

    Trigger n8n, Make, Zapier, or custom services whenever a new email arrives.

  • Application inboxes

    Receive business emails through an API instead of a shared mailbox.

  • Operational alerts

    Convert monitoring emails into GitHub issues, PagerDuty incidents, Slack alerts, or tickets.

  • Conversation-based workflows

    Keep the full email thread together for customer support, approvals, AI assistants, and collaborative workflows.

  • AI inboxes

    Give AI agents their own email address to receive requests, process messages, and trigger actions.

  • CV / candidate parsing

    Receive CVs sent to careers@yourdomain.com, extract attachments, and forward structured candidate data into your ATS.

  • CRM lead capture

    Turn inbound emails into CRM leads – parse sender, subject, and message body straight into your sales pipeline.

Frequently Asked Questions

  • Do I need a custom domain or DNS setup to receive email?

    No. You can create a Mailtrap-hosted inbox and start receiving email immediately. Every inbox gets a unique address (for example, app-3f2a@inbound-mailtrap.io) that works out of the box. If you need to receive email on your own domain, you can connect it later.

  • Should I use webhooks or the Messages API?

    It depends on your use case. Webhooks are best for real-time processing and event-driven workflows. The Messages API is ideal when your application prefers polling or needs to retrieve messages on demand. You can use both together if needed.

  • How are attachments handled?

    Attachments come back as signed download URLs in the Messages API response. The webhook itself contains only message identifiers – fetch the message via the API to get the download URLs. This keeps payloads small and lets you download files only when needed.

  • How are webhook deliveries secured?

    Every webhook payload is signed using HMAC-SHA256. Verify the signature using the Mailtrap-Signature header to ensure requests originated from Mailtrap. Failed deliveries are retried every 5 minutes, up to 40 attempts, then the webhook is paused and you are notified by email.

  • Can I test inbound email before going live?

    Yes. Create a dev inbox separate from production and send test emails to it to verify your receiving logic. To test the replies your application sends back, send them to Email Sandbox during dev instead of real recipients, and check content and recipients before going live.

  • Can I reply to inbound emails?

    Yes. You can send replies through the API while preserving the conversation thread. Mailtrap automatically manages the threading headers (In-Reply-To, References) and sender address. On Mailtrap-hosted inboxes, replies are capped at 20 in total – connect a custom domain to remove the limit.

  • Can I create multiple inboxes for different workflows or environments?

    Yes. Inboxes are fully programmable. Create, organize, and manage them through the API, making it easy to provision dedicated addresses for customers, projects, environments, or internal workflows.

  • How many inboxes can I create?

    Provision as many inboxes as you need. Create separate inboxes for customers, environments, applications, or workflows and manage them entirely through the API.