Skip to content

Feedback Survey API

To fetch the feedback survey scores provided by the user in the conversation with a virtual assistant and push the data for visualization on the Feedback Analytics module using the Survey Type and Survey Name.

Method POST
Endpoint https://{{host}}/api/public/bot/{{BotID}}/saveFeedback

Content Type application/json
Authorization auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Metrics
  • Admin Console: Bot Analytics > Feedback Analytics

Path Parameters

PARAMETER DESCRIPTION TYPE
host The environment URL. For example, https://bots.kore.ai string, required
BotId Bot ID or Stream ID can be accessed under General Settings on the Bot Builder.

Note: This is required only for Bot Builder API scope of Proactive Messages.

string, required

Sample Request

curl --location 'https://{{host}}/api/1.1/public/bot/{{botId}}/saveFeedback' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"channelUId":"qatesting@vomoto.com",
"name":"Thumb",
"score":0,
"channel":"rtm",
"type":"THUMB",
"language":"en",
"message":""
}'

Request Body Parameters

PARAMETER DESCRIPTION TYPE
channelUId The ID of the user on the channel where the feedback survey was triggered. Can be the user’s email id or enterprise assigned unique id. string, required
name The name of the survey provided by the user. string, required
score The feedback survey score provided by the user as a response. number, required
channel The channel used for the feedback survey. string, required
type One of the feedback survey types THUMB, NPS, or CSAT. string, required
language The language in which the Feedback survey is triggered. string, required
message The message prompted to the user during the feedback survey. string, required

Sample Response

{
"botId": "st-053cd130-f983-577a-8aad-2504aebd60b9",
"channel": "rtm",
"language": "en",
"score": 0,
"timestamp": "2023-03-23T07:07:43.538Z",
"createdOn": "2023-03-23T07:07:43.538Z",
"timestampValue": 1679555263538,
"type": "THUMB",
"name": "Thumb",
"channelUId": "qatesting@vomoto.com",
"orgId": "o-89b0abd5-19af-5017-a80a-6fc6bfc7a638",
"accountId": "60dbef1bc2f5c25106cdb57d",
"userId": "u-f5d97fb8-8767-5b6c-a28d-09e9ac281e12",
"_id": "641bfabf0353f52d915f7a87",
"__v": 0
}

Response Body Parameters

PARAMETER DESCRIPTION TYPE
botId The ID of the virtual assistant for which feedback was given. You can access it from the virtual assistant’s General Settings page. string, required
channel The channel on which the user responds to the feedback survey. string, required
language The language in which the feedback survey is triggered. string, required
score The feedback score. number, required
timestamp Feedback response date converted into timestamp format. date (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ), required
createdOn Feedback creation date converted into timestamp format. date (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ), required
timestampValue Creation date converted into timestamp numeric format. number, required
type The feedback survey type. string, required
name The feedback survey name. string, required
channelUId The end-user’s channel user identifier. string, required
orgId Organization id the bot belongs to. string, required
accountId Account id the bot belongs to. string, required
userId User id the bot belongs to. string, required
_Id Unique identifier for the message record. string, required
__v The value is always 0. Does not have any significance as of now. integer, optional