| Field | Value |
|---|---|
| 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 | App Builder: Metrics; Admin Console: Bot Analytics > Feedback Analytics |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
host | string, required | The environment URL. For example, https://platform.kore.ai. |
BotId | string, required | Bot ID or Stream ID. Access it under General Settings on the App Builder. |
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 | Type | Description |
|---|---|---|
channelUId | string, required | The ID of the user on the channel (email or enterprise unique ID). |
name | string, required | The name of the survey provided by the user. |
score | number, required | The feedback survey score. |
channel | string, required | The channel used for the feedback survey. |
type | string, required | Feedback survey type: THUMB, NPS, or CSAT. |
language | string, required | The language in which the feedback survey is triggered. |
message | string, required | The message prompted to the user during the feedback survey. |
Sample Response
{
"botId": "st-053cd130-f983-577a-8aad-2504xxxxxxxx",
"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-xxxxxxc7a6xx",
"accountId": "60dbef1bc2f5c25106cdb57d",
"userId": "u-f5d97fb8-8767-5b6c-a28d-xxxxxx281exx",
"_id": "641bfabf0353f52d9xxxxxxx",
"__v": 0
}
Response Body Parameters
| Parameter | Type | Description |
|---|---|---|
botId | string | The ID of the AI Agent. |
channel | string | The channel on which the user responded. |
language | string | The language of the feedback survey. |
score | number | The feedback score. |
timestamp | date | Feedback response date in ISO format. |
createdOn | date | Feedback creation date in ISO format. |
timestampValue | number | Creation date as epoch timestamp. |
type | string | The feedback survey type. |
name | string | The feedback survey name. |
channelUId | string | The end-user’s channel user identifier. |
orgId | string | Organization ID the bot belongs to. |
accountId | string | Account ID the bot belongs to. |
userId | string | User ID. |
_id | string | Unique identifier for the record. |