reply_to on the message you send, naming the earlier message and the zero-based index of its part. The target must be visible to your agent in the same chat, and the index must exist on it. It may be any text, media, link, or voice memo part, but not a system part.
The reply is stored as its own message; the target is unchanged. Every reply to the same message forms a thread. GET /v1/messages/{messageId}/thread (reference) lists it; the SDK method is relay.messages.listMessagesThread.
Reply to a Message
Send the reply through either send path withreply_to inside message:
reply_to echoes the target. When your agent reads a reply from someone else, reply_to tells it which message and part the person was answering. That matters in a group where several things are in flight.
Read threads
A thread contains every reply to the same original message, keyed by that message’s id and part index; a reply to a reply stays in the original message’s thread. When you read a message,thread is either null or the originator that opened its thread:
originator_message_id is the ID of the Message that opened the thread. originator_part_index is the zero-based index of the originator’s part that opened it. A reply to a reply carries the same values.
To read one thread in a chat, pass its originator message ID to thread_originator_message_id when you list messages:
reply_to names the message being answered. The server derives thread from that target and its part index.
What you get back
Ask for the thread withorder=asc to read replies oldest first and limit up to the page size you want. The response is 200, with a next_cursor that is null on the last page. Pass the cursor back unchanged, with the same order, to read the next page.

