---
title: "Set Message Feedback"
method: PUT
path: "/api/chat/messages/{message_id}/feedback"
tags: ["chat"]
---

# Set Message Feedback

`PUT /api/chat/messages/{message_id}/feedback`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/chat/messages/{message_id}/feedback`
- Auth: HTTP bearer

Rate an AI response (thumbs up / thumbs down / clear).

对 AI 回答进行评价（点赞/点踩/取消）。

## Path parameters

- `message_id` integer, required

## Request body

- FeedbackRequest
  - `feedback` 'up' | 'down', nullable

## Response `200`

Successful Response

- ChatMessageResponse
  - `id` integer, required
  - `role` string, required
  - `content` string, required
  - `sources` ChatSource[], nullable, required
    - `text_id` integer, required
    - `juan_num` integer, required
    - `chunk_index` integer
    - `chunk_text` string, required
    - `score` number, required
    - `title_zh` string
    - `lang` string
    - `source_id` integer, nullable
    - `parallel_chunks` ParallelChunk[]
      - `text_id` integer, required
      - `juan_num` integer, required
      - `chunk_index` integer, required
      - `chunk_text` string, required
      - `lang` string, required
      - `title` string
      - `confidence` number
      - `urn` string, nullable
    - `urn` string, nullable
    - `located` boolean
    - `located_window` string, nullable
    - `located_texts` integer, nullable
  - `trust_status` ChatTrustStatus
    - `state` 'verified' | 'citation_corrected' | 'quote_relaxed' | 'quote_unverified' | 'sources_available' | 'no_sources', required
    - `citation_count` integer
    - `source_count` integer
    - `citation_mutation_count` integer
    - `quote_mutation_count` integer
    - `quote_checked_count` integer, nullable
    - `checked_quotes` ChatCheckedQuote[], nullable
      - `title` string, required
      - `juan` integer, nullable
      - `quote` string, required
    - `max_source_score` number, nullable
    - `min_source_score` number, nullable
  - `feedback` string, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
