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

# Get Message

> Fetch a single message from a chat

Returns one message from a chat by id — the same message shape [Get Chat](/api-reference/chats/get-chat) returns in its `messages` array. Useful for refreshing a single row (for example, re-signing an upload's download URL) without refetching the whole conversation.

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the [authenticate](/api-reference/authentication/authenticate) endpoint.
</ParamField>

<ParamField path="chat_id" type="string" required>
  The chat containing the message.
</ParamField>

<ParamField path="message_id" type="string" required>
  The message to fetch.
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  Unique identifier for the message.
</ResponseField>

<ResponseField name="role" type="string" required>
  Either `"user"` or `"assistant"`.
</ResponseField>

<ResponseField name="type" type="string" required>
  The message kind: `user`, `final`, `tool_call`, `tool_result`, `tool_message`, `scope_notice`, or `error`.
</ResponseField>

<ResponseField name="content" type="string" required>
  The message content. For `tool_result` / `tool_call` messages this is the JSON-encoded tool payload.
</ResponseField>

<ResponseField name="timestamp" type="string" required>
  ISO 8601 timestamp when the message was created.
</ResponseField>

<ResponseField name="metadata" type="object | null" required>
  Additional metadata (feedback, uploads with freshly presigned URLs). Same shape as in [Get Chat](/api-reference/chats/get-chat).
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl "https://api.trellis.sh/v1/chats/9f0ac8f2-7a22-4ec8-a778-b0b1b83a86bb/messages/69fd9d75-7141-4584-b8be-7dd6a3073459" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  response = requests.get(
      "https://api.trellis.sh/v1/chats/9f0ac8f2-7a22-4ec8-a778-b0b1b83a86bb/messages/69fd9d75-7141-4584-b8be-7dd6a3073459",
      headers={"Authorization": "Bearer YOUR_TOKEN"},
  )
  message = response.json()
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    "https://api.trellis.sh/v1/chats/9f0ac8f2-7a22-4ec8-a778-b0b1b83a86bb/messages/69fd9d75-7141-4584-b8be-7dd6a3073459",
    { headers: { Authorization: "Bearer YOUR_TOKEN" } },
  );
  const message = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "69fd9d75-7141-4584-b8be-7dd6a3073459",
    "role": "assistant",
    "type": "final",
    "content": "There were 1,523 orders placed last month.",
    "timestamp": "2026-01-11T14:30:10Z",
    "metadata": {
      "feedback": "positive"
    }
  }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "detail": "Message not found"
  }
  ```
</ResponseExample>
