Account DLR Statistics
Last updated
This endpoint can be used to retrieve DLR statistics for your account or a specific chatbot. It differs from the specific bot DLR statistics 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.
Account Statistics calls are throttled at 1 call per account per hour. Trying to access this endpoint before the expired hour will result in an error.
The following request will retrieve statistics data:
curl --location --request GET
'https://publicapi.xenioo.com/analytics/statistics/dlr/account/<APIKEY>/<GROUPMODE>/<DAYS>' \
--header 'Authorization: Bearer <ACCOUNT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'The following parameters are expected on the endpoint:
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.
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.
FROM
The start date for returned values. Template of date is YYYY-MM-dd.
TO
The end date for returned values. Template of date is YYYY-MM-dd.
CHANNELID
The channel for returned values
BROADCASTID
The broadcast for returned values.
INCLUDEPREVIOUSPERIOD
If true, it returns also the data of the same amount of days requested doubled.
Time grouping modes can be instead one of the following:
hour
Group entries by hours
day
Group entries by days
month
Group entries by months
year
Group entries by years
minute
Group entries every 10 minutes
If successful, the response will contain a detailed array of statistical data.
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
[
{
"GroupLabel":"...",
"GroupMode":"...",
"EventLabel":"...",
"ParentAPIKey":"...",
"ChannelName":"...",
"ChannelProviderId":"...",
"Date":"...",
"Value":1,
"Count":1
}
]