Record thumbs up/down on an assistant reply
const url = 'http://localhost:11044/api/v1/chat/feedback';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"text":"example","verdict":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/chat/feedback \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "text": "example", "verdict": "example" }'Publishes a CHAT-sourced UserFeedbackEvent for the given message text and verdict. Doesn’t require an open stream — it’s a judgement on a reply already received, not a new turn.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The judgement on a reply already received: text is the reply being judged and must not be blank, and verdict is up or down, case-insensitive; anything else is refused with 400. It is recorded as chat feedback from the caller in their world, and needs no open session or stream
A thumbs up or down on an assistant reply already received; the body of POST /chat/feedback
object
Text of the assistant reply being judged; blank is a 400
Up or down, case-insensitive; anything else is a 400
Example generated
{ "text": "example", "verdict": "example"}Responses
Section titled “Responses”Feedback recorded
object
Missing text or an unrecognised verdict
A refusal from the chat surface: the word error and the reason, written to be shown
object
What was refused and why, such as no open stream, no active session, or an unknown command
Always error. A client may branch on it rather than on the status code
Example
error
