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
Trusted by teams building with AI
Turn raw email into clean JSON
Skip the custom MIME parsing, header extraction, and attachment handling. Mailtrap converts every incoming message into a predictable JSON payload your backend can consume immediately – sender, recipients, subject, headers, plain text, HTML body, and attachment download URLs, all in one structured object.
Need help with our last invoice
Hi team!
We were charged twice on invoice #4821 last week. Could you take a look and refund the duplicate? Screenshot attached.
Best regards,
Sarah
{
"id": "msg_01HZX...",
"inbox": "support-bot",
"from": { "name": "Sarah Chen", "email": "sarah@acme.co" },
"to": [{ "email": "support-bot@inboundly.dev" }],
"subject": "Need help with our last invoice",
"received_at": "2026-05-27T10:42:11Z",
"text": "Hey team, We were charged twice...",
"html": "<p>Hey team,</p>...",
"attachments": [
{ "filename": "invoice-4821.png",
"size": 188416,
"content_type": "image/png",
"url": "https://cdn.inboundly.dev/..." }
],
"spam_score": 0.04,
"spf": "pass",
"dkim": "pass",
"thread_id": "thr_8Pz..."
}
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.
-
POST /inbound/folders/{id}/inboxes
Create Mailtrap-hosted inboxes inside a folder.
-
POST /accounts/{id}/webhooks
Set up a signed JSON webhook for inbound events.
-
GET /inbound/inboxes/{id}/threads
List conversation threads in an inbox – each thread groups messages by reply chain.
-
GET /inbound/inboxes/{id}/messages/{id}
Fetch a full message with body, headers, and attachment URLs.
Copy
curl -X POST https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes \
-H 'Authorization: Bearer YOUR_API_KEY'
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
- Manage inboxes and webhooks programmatically with retries built in
-
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.
Connect Mailtrap with the tools your team already uses
Integrate email API into your stack: native support for modern dev tools and AI coding assistants.
Supabase
Vercel
Claude Code
Mailtrap MCP Server
Cursor
Google Antigravity
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 automatically with exponential backoff over 24 hours.
-
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, route them to Email Sandbox during dev – inspect content, threading headers, 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.