---
title: "Submit feedback on AI response"
method: POST
path: "/conversations/{conversationId}/message/{messageId}/feedback"
tags: ["Conversations"]
---

# Submit feedback on AI response

`POST /conversations/{conversationId}/message/{messageId}/feedback`

Append a feedback entry to a bot-response message.

**Overview**

Feedback helps improve AI response quality over time. You can record an
overall helpfulness signal, issue categories, and free-text comments.
Each call appends a new entry to the message; previous entries are
preserved.

**Feedback options**

- `isHelpful` — overall thumbs up/down.
- `categories` — issue or positive categories from a fixed list.
- `comments` — free-text `positive` and `negative`.

**Restrictions**

Feedback can only be submitted on `bot_response` messages — user
queries and system messages are rejected with `400`.

## Path parameters

- `conversationId` string, objectId, required
- `messageId` string, objectId, required

## Request body

- MessageFeedbackSubmitRequest — Gateway request body for submitting message feedback (Zod `feedbackBodySchema`). All fields are optional; an empty object is accepted. Matches the first-party chat UI payload shape.
  - `isHelpful` boolean — Overall helpfulness signal (thumbs up/down).
  - `categories` string[] — Issue or positive categories that apply to the response.
  - `comments` object — Free-text comments grouped by sentiment.
    - `positive` string — What was good about the response.
    - `negative` string — What could be improved.

## Response `200`

Feedback submitted successfully.

- MessageFeedbackUpdateResponse — Gateway response after appending feedback to a bot-response message.
  - `conversationId` string, objectId, required — Conversation the feedback was attached to.
  - `messageId` string, objectId, required — Message the feedback was attached to.
  - `feedback` MessageFeedbackAppendEntry, required — The feedback entry just appended to the message. Echoes the fields supplied in the request plus server-stamped `feedbackProvider`, `timestamp`, and `metrics`.
    - `isHelpful` boolean — Echoed from the request when supplied.
    - `categories` string[] — Echoed categories from the request.
    - `comments` object — Echoed free-text comments from the request.
      - `positive` string
      - `negative` string
    - `feedbackProvider` string, objectId, required — User who submitted the feedback. Always present.
    - `timestamp` integer, required — Submission time as epoch milliseconds (not an ISO 8601 datetime). Always present.
    - `metrics` MessageFeedbackAppendMetrics, required — Telemetry recorded server-side alongside the feedback. Always present on append responses.
      - `timeToFeedback` number, required — Milliseconds between message creation and feedback submission. Always present.
      - `userAgent` string — Value of the `User-Agent` request header captured server-side.
  - `meta` object, required
    - `requestId` string, required — Server-side request identifier. Read from the `X-Request-ID` header when supplied, otherwise auto-generated, so this field is always present.
    - `timestamp` string, date-time, required
    - `duration` integer, required — Server-side processing time in milliseconds.

## Other responses

- `400` — Invalid request. Possible causes: - Feedback target is not a `bot_response` message. - A `categories` value is not in the allowed list. - `conversationId` or `messageId` is not a valid ObjectId.
- `401` — Unauthorized.
- `404` — Conversation or message not found, or the caller does not have access to this conversation.
- `500` — Persistence layer failed to append the feedback entry.

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
