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

# Get Chat

> Retrieve a chat by ID including the full conversation history

Retrieve a chat by ID including the full conversation history and metadata.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token with your Deeptrace API key. Format: `Bearer <your_api_key>`.
</ParamField>

## Parameters

<ParamField path="chat_id" type="string" required>
  UUID of the chat, returned by [Send Chat Message](/send-chat).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.deeptrace.com/api/v1/chats/baa1b1be-4905-4448-9a37-159f08dfc570" \
    -H "Authorization: Bearer <your_api_key>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.deeptrace.com/api/v1/chats/baa1b1be-4905-4448-9a37-159f08dfc570",
      headers={"Authorization": "Bearer <your_api_key>"}
  )

  data = response.json()
  print(data["id"], data["messages"])
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.deeptrace.com/api/v1/chats/baa1b1be-4905-4448-9a37-159f08dfc570",
    {
      headers: { "Authorization": "Bearer <your_api_key>" },
    }
  );

  const data = await response.json();
  console.log(data.id, data.messages);
  ```
</RequestExample>

## Returns

Returns the full chat object with conversation history, data sources, investigation results, and citation map.

<ResponseExample>
  ```json 200 — Success theme={null}
  {
    "id": "baa1b1be-4905-4448-9a37-159f08dfc570",
    "created_at": "2026-03-10T12:00:00Z",
    "messages": [
      {"role": "user", "content": [{"type": "text", "text": "What errors are happening?"}]},
      {"role": "assistant", "content": [{"type": "text", "text": "Let me check your error tracking tools..."}]}
    ],
    "data_sources": [],
    "investigation_results": [],
    "citation_map": {}
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string">
  UUID of the chat.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the chat was created.
</ResponseField>

<ResponseField name="messages" type="object[]">
  Array of message objects with `role` and `content` fields. Content is an array of content blocks (e.g. `{"type": "text", "text": "..."}`).
</ResponseField>

<ResponseField name="data_sources" type="array">
  Data sources referenced during the chat.
</ResponseField>

<ResponseField name="investigation_results" type="array">
  Investigation results generated during the chat.
</ResponseField>

<ResponseField name="citation_map" type="object">
  Map of citation references to their source data.
</ResponseField>
