Receiving replies
Inbound mail, threading, and reading a conversation.
Sending is half of a conversation. Replies are parsed, threaded against the message they answer, and made available as a transcript.
How threading works
Every outbound message carries a Message-ID we control. A reply echoes it in In-Reply-To, and that exact string is how the inbound message finds its conversation.
There is deliberately no fallback to subject matching. Two customers both replying to "Re: Invoice" would otherwise merge into one thread, and anything reading that thread would answer one of them using the other's context. When nothing matches, a new thread starts.
Reading a thread
GET /v1/threads/{id} returns outbound and inbound messages merged in order. Read text — quoted history and signatures are already removed. raw_text holds the untrimmed body for the cases where that trim gets it wrong, and it does sometimes.
# What has someone said that I haven't answered?
curl "https://api.example.com/v1/threads?awaiting_reply=true" \
-H "Authorization: Bearer $API_KEY"Trusting a reply
Replying
Use reply_to_message_id on POST /v1/emails rather than composing a fresh send. It sets the threading headers so the recipient's mail client shows one conversation instead of a pile of unrelated messages.
Next: Limits for agents