---
title: "Send Chat Message"
method: POST
path: "/api/v1/gems/{gem_id}/chat"
tags: ["Gemstones"]
---

# Send Chat Message

`POST /api/v1/gems/{gem_id}/chat`

## 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`
- Auth: HTTP bearer

POST /api/v1/gems/{gem_id}/chat - Send a chat message to refine gemstone scan data

Allows users to provide additional context or corrections to their gemstone scan.
The AI validates the message against the original images and either updates the
gemstone data or rejects contradictory requests.

Args:
    gem_id: ID of the gemstone to chat about
    request: ChatMessageRequest with user's message
    current_user: Authenticated user
    db: Database session

Returns:
    ChatMessageResponse with message details (same format as history)

## Path parameters

- `gem_id` integer, required

## Request body

- ChatMessageRequest: Request schema for sending a chat message to refine gemstone data
  - `message` string, required

## Response `200`

Successful Response

- ChatMessageResponse: Response schema after sending a chat message (matches MessageHistoryItem)
  - `id` integer, required
  - `user_message` string, required
  - `ai_message` string, nullable
  - `was_accepted` boolean, required
  - `created_at` string, date-time, 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)
