---
title: "Get Chat History"
method: GET
path: "/api/v1/gems/{gem_id}/chat/history"
tags: ["Gemstones"]
---

# Get Chat History

`GET /api/v1/gems/{gem_id}/chat/history`

## Request

- Base URL: `https://api.gemstoneaiapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemstoneaiapp.com/api/v1/gems/{gem_id}/chat/history`
- Auth: HTTP bearer

GET /api/v1/gems/{gem_id}/chat/history - Get conversation history for a gemstone

Retrieves all chat messages associated with a gemstone scan, including both
accepted refinements and rejected requests.

Args:
    gem_id: ID of the gemstone
    current_user: Authenticated user
    db: Database session

Returns:
    ChatHistoryResponse with list of all messages

## Path parameters

- `gem_id` integer, required

## Response `200`

Successful Response

- ChatHistoryResponse: Response schema for chat history
  - `gemstone_id` integer, required
  - `messages` MessageHistoryItem[], required
    - `id` integer, required
    - `user_message` string, required
    - `ai_message` string, nullable
    - `was_accepted` boolean, required
    - `created_at` string, date-time, required
  - `total_messages` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api.md) · [All operations](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/revisions/fcb441f55161?raw)
