Skip to main content
Send feedback when you learn whether an answer was right, for example when an agent corrects a routed ticket. Feedback is recorded per answer and helps track errors on real traffic.

Get the request id

Every /v1/decide response carries its request id in the X-Request-ID header. It is not in the JSON body.
The SDK reads the header for you:
You can also set your own id by sending an X-Request-ID header with the decision: 1 to 128 characters of letters, digits, ., _, : and -. Krun keeps it and returns it. Otherwise Krun generates one like req_.... With the Python SDK, pass request_id= to decide(). Store the request id with the decision in your system, so you can send feedback later.

Send feedback

The API returns 201 Created:

Rules

  • The request_id must belong to a decision made by the same project. Any API key of the project can send feedback. Otherwise the API returns 404 NOT_FOUND.
  • Krun does not store the content of your requests, so it can’t check that the request had a question with that question_id. Send the id you used in the request.
  • Send one feedback call per answer. For a request with three questions, send up to three calls.
  • Feedback is never retried automatically by the SDK, because the API has no idempotency key. If a call fails with a network error, check before sending it again.