Skip to content

Feedback API

This API is used to capture user feedback and store it within Search AI, where it is displayed as part of the Answer Analytics.

Method POST
Endpoint https://{{host}}/api/public/bot/<AppId>/search/feedback
Content-Type application/json
Authorization auth: <JWT Token>
API Scope Answer Insights

Query Parameters

Parameters Description Mandatory
AppID Provide your application ID here. To view your App ID, go to the Dev Tools under App Settings. You can view the AppID under the API scopes. Yes

Request Parameters

Parameters Description Mandatory
searchRequestId This is the search request ID sent along with the answer in response to a search query. Search request ID starts with fsh, for example “fsh-a7dd595f-xxxx-xxxx-9b1c-7635d6ea113c

“.

Yes
feedbackLevel Since the feedback mechanism is enabled for only Answers currently, this field can take the following value only.
  • smartAnswer
Yes
event This field is used to pass the feedback response.
  • thumbsDown - Negative Response
  • thumbsUp - Positive response
Yes
comments This field can be used to pass user comments to the application along with the feedback. Use the “tags” field to pass an array of strings as comments to the API. The string values in the tags array are displayed in the Answer Insights details page. Refer to the sample curl below for reference. No

Sample Curl

curl --location 'https://staging-xo.korebots.com/api/public/bot/st-66c4xxxx-6eae-5ada-b0f8-a2022e945a10/search/feedback' \
--header 'auth: eyJhbGciOiJaxxxxxxx_abcd' \
--header 'Content-Type: application/json' \
--data '{
    "searchRequestId": "fsh-a7dd595f-7ba2-59c2-9b1c-7635d6ea113c",
    "feedbackLevel": "smartAnswer",
    "event": "thumbsDown",
    "comments": {
        "tags":[
  "Incorrect Answer",
  "Incorrect Citation",
  "Incorrect Formatting",
  "Ambiguous",
  "Missing details",
  "Hallucination",
  "Out of Date"
]
    }
}'