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.
- Python SDK
- curl
- TypeScript (coming soon)
The SDK reads the header for you:
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
201 Created:
Rules
- The
request_idmust belong to a decision made by the same project. Any API key of the project can send feedback. Otherwise the API returns404 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.