Skip to main content
A conversation layer sits on top of the inbox and outbound tables so a support agent — human or AI — can triage threads instead of individual messages.

Threading

Inbound mail is threaded by RFC headers (Message-ID, In-Reply-To, References) first, falling back to subject plus participants within CONVERSATION_MATCH_WINDOW_DAYS (default 30) when headers are missing.

Triage state

Each conversation carries: A new inbound message to a closed or snoozed conversation reopens it to open.
Reopening is unconditional, and it is the behaviour that most often surprises people building automations: an auto-reply, an out-of-office bounce, or a “thanks!” all reopen a conversation an agent had just closed. If you triage on status, filter on last_message_at as well, or the same thread will come back around the queue.
Received attachment bytes are retained up to ATTACHMENT_MAX_BYTES (default 10 MB) and are individually fetchable. Message subject and body are indexed in FTS5 for full-text search.

REST API

List filters include conversation age and unanswered state.

Triaging a thread

Pull the unanswered conversations for an assignee, read one, and reply on it:
Searching runs against the FTS5 index over subject and body, across both directions of the thread:

MCP tools

A triage_inbox prompt is also served — see MCP server.

Mailboxes

Register addresses on a managed domain, e.g. support@emails.stateset.com. Incoming IMAP mail whose To: or Cc: matches a registered address is routed to that mailbox (inbox.mailbox_id). When MAIL_DOMAIN is set, the send endpoint requires the from address on that domain to be a registered mailbox. Managed-domain onboarding is driven by these settings:

Webhooks

Conversation activity is carried on the standard webhook stream. inbox.received events include the conversation, mailbox, domain, and tenant, plus attachment metadata; bounce events carry the recipient. Subscriptions can be scoped to a tenant. See Configuration for subscription management.

Next steps

Configuration

The environment variables referenced above, and how to subscribe to the webhook stream.

MCP server

Drive the same triage loop from an agent, including the triage_inbox prompt.
Last modified on August 29, 2026