Account Statistics Data

This endpoint can be used to retrieve statistics data for your account or a specific chatbot. It differs from the specific bot statistics data endpoint as it can be used to obtain data for all of the bots associated to an account.

The data you can retrieve with this API endpoint is identical to the data available in live dashboards.

Request

The following request will retrieve statistics data:

curl --location --request GET 
'https://publicapi.xenioo.com/analytics/statistics/account/<APIKEY>/<TYPES>/<GROUPMODE>/<DAYS>' \
--header 'Authorization: Bearer <ACCOUNT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'

Parameters

The following parameters are expected on the endpoint:

ParameterDescription

APIKEY

The API key of the bot for which you would like to filter the data. If you want the data of all of the bots, use a * (wildcard) as value.

TYPES

A comma separated list of all the possible types of analytic endpoints available. See belo table and example.

GROUPMODE

The time group mode for the returned values. Sett below table for possible values

DAYS

The amount of history days to return. Acceptable values go from 1 to 30 days of history.

Supported types are as follows:

TypeCode

New User

0

Returning User

1

Active User

2

Messages

3

Action Messages

4

Fallback Reply

5

NLP Detected

6

NLP Missed

7

Conversation Length

8

Time To Pick Up

9

Takeover Rate

10

Support Conversation Length

11

Goal Reached

12

Incoming Message

13

API Request

14

API Request Error

15

Time To First Message

16

Operator Message

17

Time grouping modes can be instead one of the following:

ValueDescription

hour

Group entries by hours

day

Group entries by days

month

Group entries by months

year

Group entries by years

Response

If successful, the response will contain a detailed array of statistical data.

[
   {
      "GroupLabel":"...",
      "BotName":"...",
      "ChannelName":"...",
      "EventLabel":"...",
      "IsPreviousPeriod":false,
      "GoalId":"...",
      "GoalName":"...",
      "ReferenceValue":0,
   } 
]

Response Codes

This endpoint will reply with the following standard HTTP codes.

Code

Meaning

200

Ok. The request has been successfully fulfilled.

404

Not Found. The specified account or bot has not been found.

Last updated