> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staging.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Replies

> Reply to an exact Message part in a Relay Chat.

Set `reply_to` on a new Message to quote an earlier part.

## Reply to a Message

<CodeGroup>
  ```typescript TypeScript SDK theme={null}
  await relay.chats.messages.send(chatId, {
    message: {
      parts: [{ type: "text", value: "That image looks correct." }],
      reply_to: {
        message_id: messageId,
        part_index: 1,
      },
    },
  });
  ```

  ```bash cURL theme={null}
  curl -sS -X POST "https://api.relayapp.im/v1/chats/$CHAT_ID/messages" \
    -H "Authorization: Bearer $RELAY_AGENT_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "message":{
        "parts":[{"type":"text","value":"That image looks correct."}],
        "reply_to":{
          "message_id":"01993d50-b4ce-71e6-8e65-35d325d95ddb",
          "part_index":1
        }
      }
    }'
  ```
</CodeGroup>

## Target a part

* The target Message must be visible in the same Chat.
* `part_index` is zero based.
* The index must exist on the target Message.
* Any non-system text, media, link, or voice memo part can be a target.
* A reply is a new Message. It does not modify the target.

## List a reply thread

<CodeGroup>
  ```typescript TypeScript SDK theme={null}
  const thread = await relay.messages.listMessagesThread(messageId, {
    order: "asc",
    limit: 50,
  });
  ```

  ```bash cURL theme={null}
  curl -sS \
    "https://api.relayapp.im/v1/messages/$MESSAGE_ID/thread?order=asc&limit=50" \
    -H "Authorization: Bearer $RELAY_AGENT_TOKEN"
  ```
</CodeGroup>

Pass `next_cursor` unchanged to read another page.

## Related

* [Message details](/guides/messaging/message-details)
* [Reactions](/guides/messaging/reactions)
