Inbound Events and Replies
Subscribe to inbound message webhooks and reply to messages in the dashboard inbox.
When EmitMail receives a message for a configured mailbox, it stores the message and can send an inbound.email.received webhook to subscribed endpoints. The webhook contains message metadata; it does not include the full message body, headers, or attachments.
Inbound webhook payload
The webhook uses the common envelope described in the API keys and webhooks guide. The inbound event's data includes fields such as:
{
"id": "stored-inbound-message-id",
"mailboxId": "mailbox-id",
"emailAddress": "support@yourdomain.com",
"threadId": "thread-id",
"messageId": "<original-message-id@example.net>",
"from": { "name": "Alex Carter", "address": "alex@example.net" },
"to": ["support@yourdomain.com"],
"subject": "Help with my account",
"snippet": "A short preview of the message",
"hasAttachments": false,
"receivedAt": "2026-11-04T12:00:00.000Z"
}For the full message and attachment details, retrieve it through the authenticated inbox API or view it in Dashboard -> Inbox. Verify the webhook signature against the raw request body before trusting event data.
Reply in the dashboard
Open the message thread in Dashboard -> Inbox and use its reply action. EmitMail uses the stored message and thread metadata to construct the reply. This is the simplest way to preserve the conversation thread.
Reply through the inbox API
The inbox API exposes a reply endpoint at POST /api/v1/inbox/messages/:messageId/reply. Authenticate with a dashboard session and send the message body as text or html:
curl -X POST "https://emitmail.yourdomain.com/api/v1/inbox/messages/INBOUND_MESSAGE_ID/reply" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN_OR_WRITE_SCOPED_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Thanks for contacting us. We are looking into this."}'The endpoint also accepts optional cc and bcc recipients. Use a dashboard session or an API key with write access to the mailbox.
cURL & Direct REST API Reference
Dispatch emails, upload attachments, and query delivery status using standard HTTP without an SDK.
Contributing Guide & Monorepo Architecture
Learn how to set up the EmitMail monorepo locally, understand the single-app multi-service architecture, and contribute across the API, Worker, Dashboard, and Documentation.