> ## Documentation Index
> Fetch the complete documentation index at: https://docs.locusmedical.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# feedback

> POST /v2/feedback — attach a thumb to an answer already served.

Every answer served leaves a trace, with its `trace_id`, the core version that
produced it and the app version that asked for it. This route is the only path
that puts a thumb on it.

Why a separate route rather than one more field on `/v2/retrieve`: the vote
arrives **after** the answer, sometimes long after — the user reads, then judges
— and sometimes never. It is a different gesture, with its own lifetime.

```json theme={null}
{
  "trace_id": "…",       // returned by /v2/retrieve, or by the stream's `done` line
  "vote": 1,             //  1 thumb up · -1 thumb down · 0 vote withdrawn
  "note": "too long"     // optional, 2,000 characters max
}
```

`vote: 0` exists so that **taking it back is a written gesture like any other**.
Without it, removing a thumb would mean deleting the row — losing the traced
answer along with the opinion.

## Idempotent

Re-posting overwrites the previous vote. That is what lets a user change their
mind, and a client retry a lost send **without counting twice**.

## Synchronous write

Unlike the trace itself, the write is synchronous: acknowledging a vote you have
not written would be lying to the user who just clicked.

## Errors

| Status | Code                   | Meaning                                                                          |
| ------ | ---------------------- | -------------------------------------------------------------------------------- |
| 404    | `TRACE_NOT_FOUND`      | Unknown `trace_id` — an answer served with logging off, or older than retention. |
| 503    | `TRACES_DISABLED`      | Logging is disabled on this instance: there is no trace to annotate.             |
| 503    | `FEEDBACK_UNAVAILABLE` | The store could not write.                                                       |

<Note>
  When `trace_id` comes back empty in an answer, logging is off: do not offer
  feedback in the UI then, rather than posting into the void.
</Note>
