AI Chat

Get Chat History By Uuid

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

get/ai/chat/history/uuid/{session_uuid}

Path parameters

session_uuidstring required

Response

Successful Response

session_idstring required

Legacy identifier for the chat session (string format).

session_uuidstring uuid nullable

New UUID identifier for the chat session.

role'user' | 'assistant' | 'tool' required
contentstring required

Content of the message. For user messages with images, this might be an empty string if no text query is provided.

image_storage_pathsstring[] nullable

List of Supabase Storage paths for images associated with the message.

user_idstring nullable

Optional Clerk ID of the user associated with the message.

tool_callsobject[] nullable

List of tool calls made by the assistant (id, type, function name, arguments).

tool_call_idstring nullable

ID of the tool call this message is a result for (links to assistant's tool_calls.id).

function_namestring nullable

Name of the function that was called (for role='tool'). Matches OpenAI 'name' field for tool role.

idstring uuid required
created_atstring date-time required

Changes