OpenMail automatically groups related emails into threads using standard RFC 2822 email headers.Documentation Index
Fetch the complete documentation index at: https://docs.openmail.sh/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When an email arrives or is sent, we resolve which thread it belongs to:- Check
In-Reply-Toheader - If it matches an existing message’sMessage-ID, the email joins that thread. - Check
Referencesheader - If any value matches an existing message’sMessage-ID, the email joins that thread. - No match - A new thread is created.
Outbound replies
When you send with athreadId, we automatically set:
In-Reply-To→ theMessage-IDof the last message in the threadReferences→ allMessage-IDvalues from the thread
Thread context
Fetch all messages in a thread viaGET /v1/threads/:id/messages. Messages are returned in chronological order, giving your agent the full conversation history to inform its next action.
Read/unread tracking
Every thread has anis_read flag that tracks whether your agent has processed it. This prevents agents from reprocessing the same emails.
How it works
- New inbound threads start as unread (
is_read: false) - Sending a reply automatically marks the thread as read
- Your agent explicitly marks threads as read via
PATCH /v1/threads/:id