/api/v1/feedback capture structured per-message signal — thumb-up/down, edit, regenerate — for the continuous-learning loop. Rows are keyed to an OTel trace_id so the eval pipeline can join signals back onto the run that produced them. See the Feedback guide for the design contract and UI flow.
All endpoints require authentication. Rows are private to the authoring user — no cross-user reads, even within the same workspace.
Endpoints
Signals
Create, read, and clear per-message feedback rows scoped to the authoring user.Create / upsert feedback
(message_id, user_id, signal) tuple. A re-submit with the same triple replaces reason, trace_id, chat_id, and workspace_id on the existing row rather than producing a duplicate.
Request body:
Response:
201 Created
Example:
List feedback
message_id or trace_id must be provided. Returns only rows authored by the caller — no cross-user visibility.
Query parameters:
The request has no body. Supplying both filters is rejected with
400.
Response: 200 OK
created_at DESC. Empty array when no matching rows visible to the caller.
Errors:
Delete feedback
(message_id, signal) tuple. Other users’ rows on the same message are untouched.
Query parameters:
Response:
204 No Content
Idempotent: returns 204 even when no row matched, so a client can fire DELETE on every toggle-off click without first checking existence.
Errors:
Schema
message_feedback table (added in migration v96):
trace_id to join feedback signals onto the routine run that produced them; see Online eval sampler.