Skip to main content
PUT
/
api
/
v1
/
products
/
{product_id}
/
conversations
/
{conversation_id}
/
feedback
Submit feedback on a conversation
curl --request PUT \
  --url https://api.clarityq.ai/api/v1/products/{product_id}/conversations/{conversation_id}/feedback \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "comment": "<string>"
}
'
{
  "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_at": "2023-11-07T05:31:56Z",
  "rating": "<string>",
  "comment": "<string>"
}
Submit or replace feedback — a thumbs rating and/or a free-text comment — on a conversation’s latest answer. The feedback is stored on the answer exactly like the in-app 👍 / 👎, so feedback left through the API and through the ClarityQ app are interchangeable and appear in the same places. You only pass the conversation_id: the server resolves which answer to rate from the conversation’s latest message. The conversation must be completed — submitting before the answer is ready returns 409. The call is idempotent: submitting again fully replaces the previous feedback for that answer. Provide at least one of rating or comment; send "rating": null to clear a rating.
Example request
PUT /api/v1/products/{product_id}/conversations/{conversation_id}/feedback
Content-Type: application/json

{
  "rating": "POSITIVE",
  "comment": "Matched our dashboard exactly."
}
Example response
{
  "conversation_id": "9f1c2b4a-3d5e-4f6a-8b7c-1d2e3f4a5b6c",
  "rating": "POSITIVE",
  "comment": "Matched our dashboard exactly.",
  "updated_at": "2026-07-01T12:34:56Z"
}

Authorizations

X-API-Key
string
header
required

API key obtained from the ClarityQ dashboard.

Path Parameters

product_id
string<uuid>
required
conversation_id
string<uuid>
required

Body

application/json

Feedback to set on an answer; written to the answer's metadata.rating.

rating
enum<string> | null

Thumbs rating on the answer (POSITIVE or NEGATIVE). null clears the rating.

Available options:
POSITIVE,
NEGATIVE
comment
string | null

Optional free-text comment on the answer.

Maximum string length: 2000

Response

Successful Response

The feedback stored on an answer (its metadata.rating).

conversation_id
string<uuid>
required

Conversation the answer belongs to.

updated_at
string<date-time>
required

When the feedback was last set (RFC3339 UTC).

rating
string | null

POSITIVE or NEGATIVE; null if comment-only.

comment
string | null

The comment, if any.