---
title: "Get Chat History By Uuid"
method: GET
path: "/ai/chat/history/uuid/{session_uuid}"
tags: ["AI Chat"]
---

# Get Chat History By Uuid

`GET /ai/chat/history/uuid/{session_uuid}`

Retrieves the chat history for a given session_uuid, 
ensuring the requesting user is authorized to view it.

## Path parameters

- `session_uuid` string, required

## Response `200`

Successful Response

- ChatMessageRead[]
  - `session_id` string, required — Legacy identifier for the chat session (string format).
  - `session_uuid` string, uuid, nullable — New UUID identifier for the chat session.
  - `role` 'user' | 'assistant' | 'tool', required
  - `content` string, required — Content of the message. For user messages with images, this might be an empty string if no text query is provided.
  - `image_storage_paths` string[], nullable — List of Supabase Storage paths for images associated with the message.
  - `user_id` string, nullable — Optional Clerk ID of the user associated with the message.
  - `tool_calls` object[], nullable — List of tool calls made by the assistant (id, type, function name, arguments).
  - `tool_call_id` string, nullable — ID of the tool call this message is a result for (links to assistant's tool_calls.id).
  - `function_name` string, nullable — Name of the function that was called (for role='tool'). Matches OpenAI 'name' field for tool role.
  - `id` string, uuid, required
  - `created_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/noso/apis/crucible-backend-api.md) · [All operations](https://skmtc.dev/noso/apis/crucible-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/noso/apis/crucible-backend-api/revisions/216c8523b7ae?raw)
