message_id metadata.
If you want to reply to an email, you should add the In-Reply-To header set to the message_id of the received email. We also recommend setting the subject to start with Re: so that email clients can group the replies together.
Get the message ID
Themessage_id is included in the webhook event payload when an email is received:
message_id value from event.data.message_id as the In-Reply-To header when sending your reply.
Send a reply in thread
Here’s how you can reply in thread using each SDK:Replying multiple times in a thread
If you’re replying multiple times within the same thread, make sure to also append the previousmessage_ids to the References header, separated by spaces.
This helps email clients maintain the correct threading structure.