Skip to main content
PUT
Upsert Feedback

Authorizations

Authorization
string
header
required

A personal access token (haico_pat_...), created under Profile → API keys. Send it as Authorization: Bearer <key>. The browser session JWT is also accepted but is an internal mechanism and is not part of the public contract.

Body

application/json

Upsert payload for one piece of user feedback.

Only the structural shape is validated here (the presentation vocabulary — dimension aspects, report categories, reason tags — is owned by the frontend, so it can evolve without a backend change). The rules are: the scope must be known; the aspect must be a well-formed slug; a report carries a category and no sentiment; every other aspect carries a 3-point sentiment and an optional category.

thread_id
string
required
Required string length: 1 - 255
turn_index
integer
required
Required range: x >= 0
scope
string
required
Maximum string length: 24
aspect
string
required
Maximum string length: 40
sentiment
string | null
Maximum string length: 16
category
string | null
Maximum string length: 64
comment
string | null
Maximum string length: 2000
artifact_id
integer | null

scope='artifact' only: which artifact this rates (0/None = live document)

Response

Successful Response

One feedback row returned to the frontend for hydration.

thread_id
string
required
turn_index
integer
required
scope
string
required
aspect
string
required
sentiment
string | null
category
string | null
comment
string | null
artifact_id
integer | null
origin
string
default:user