To provide the number of users who have interacted with the bot in a given period across different time intervals.
Method | POST |
Endpoint | https://{{host}}/api/public/bot/{{BotID}}/userEngagementTrend?aggregation_type={{type}}&start_date={{from}}&end_date={{to}}&channels={{channel}} |
Content Type | application/json |
Authorization | auth: {{JWT}}
|
API Scope |
|
Path Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
BotID | Required | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
Query Parameters
Parameter | Required/Optional | Description |
---|---|---|
filters | Required | Object with the following details to filter the result set |
start_date | Required | Refers to the start time of the period to be considered. |
end_date | Required | Refers to the end time of the period to be considered. |
channel | Optional | Refers to the channel from which the interactions have happened. |
aggregation_type | Optional | Refers to the type of aggregation to be allowed, possible values are:
|
Sample Request
curl --location --request POST 'https://bots.kore.ai/api/public/bot/st-61a3723a-3597-57c4-xxxx-2953xxxxd/userEngagementTrend?aggregation_type=Daily&start_date=2023-12-06&end_date=2023-12-07&channels=rtm' \ --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ --header 'content-type: application/json'
Sample Response
- when aggregation_type = Daily
{ "results":[ { "date": "MMM DD YYYY", "users": “Number of users” }, { "date": "MMM DD YYYY", "users": “Number of users” } ], "totalResults": 2 }
- when aggregation_type = Hourly or empty or not given
{ "results": [ { "date": "Aug 06 2020", "0 - 1": 20, "1 - 2": 0, "2 - 3": 0, "3 - 4": 10, "4 - 5": 5, "5 - 6": 5, "6 - 7": 5, "7 - 8": 3, "8 - 9": 6, "9 - 10": 5, "10 - 11": 1, "11 - 12": 1, "12 - 13": 0, "13 - 14": 0, "14 - 15": 0, "15 - 16": 0, "16 - 17": 0, "17 - 18": 0, "18 - 19": 0, "19 - 20": 0, "20 - 21": 0, "21 - 22": 0, "22 - 23": 0, "23 - 0": 0 }, { "date": "Aug 07 2020", "0 - 1": 20, "1 - 2": 0, "2 - 3": 0, "3 - 4": 10, "4 - 5": 0, "5 - 6": 5, "6 - 7": 6, "7 - 8": 4, "8 - 9": 8, "9 - 10": 7, "10 - 11": 4, "11 - 12": 4, "12 - 13": 0, "13 - 14": 0, "14 - 15": 0, "15 - 16": 0, "16 - 17": 0, "17 - 18": 0, "18 - 19": 0, "19 - 20": 0, "20 - 21": 0, "21 - 22": 0, "22 - 23": 0, "23 - 0": 0 } ], "totalResults": 2 }