Feedback API
Guide to the Feedback endpoint that allows you to submit and manage feedback for kapa.ai responses The Feedback API allows you to submit feedback on a specific question-answer pair. By submitting reactions such as upvotes and downvotes, you can help improve the performance of kapa.ai.
API Route
POST /query/v1/question-answer/<KAPA_QUESTION_ANSWER_ID>/feedback
Example Usage
CURL
curl -X POST \\
'\<KAPA_API_ENDPOINT>/query/v1/question-answer/\<KAPA_QUESTION_ANSWER_ID>/feedback' \\
-H 'X-API-TOKEN: \<KAPA_API_TOKEN>' \\
-H 'Content-Type: application/json' \\
-d '{
"reaction": "my_reaction",
"user_identifier": "my_user_identifier"
}'
Request Parameters
Parameter | Type | Description |
---|---|---|
KAPA_QUESTION_ANSWER_ID | string | The unique ID of the question-answer pair for which you want to provide feedback |
reaction | string | The type of reaction to provide ("upvote" or "downvote") |
user_identifier | string | A unique identifier for the user providing feedback |
Response
The response for the Feedback Endpoint will be a JSON object containing the following fields:
{
"total_upvotes": 10,
"total_downvotes": 3
}
Field | Type | Description |
---|---|---|
total_upvotes | integer | The total number of upvotes for the question-answer pair |
total_downvotes | integer | The total number of downvotes for the question-answer pair |
These example responses demonstrate the JSON structure returned by the Feedback endpoint. By sending feedback, you can track accuracy of responses, help kapa.ai to improve its understanding of user preferences and provide more accurate answers in the future.