Kindly Docs

Go to App
⌘K
▶️Introduction
🔹Getting started with webhooks
🔹Webhooks reference
🔹Message processing
🔹Pattern dialogues
🔹Context memory
🔹Languages
📄Guides and Examples
◽Checking webhook signatures (HMACs)
◽Example: Chatlog webhook
◽Kindly Chat authentication
◽Inbox backup to S3 bucket
◽Add the Spinnaker script tag to your site
◽Set up event tracking with Google Tag Manager (GTM)
⚙️APIs
▪️Application API
▪️Chat API
▪️Chat Log API
▪️Handover API
▪️Nudge API
▪️Statistics API
▪️iOS SDK
▪️Android SDK
▪️Ticket webhooks (BETA)
📦Legacy
📝APIs Changelog
🛡️Security
©️License and Disclaimer
Docs powered by archbee 

Statistics API (deprecated)

⚠ Deprecated API

This API is deprecated and will eventually be removed. You can try the new, more powerful statistics API now. Below you can find the documentation for the deprecated API until it is removed.

API key

Using the API key created in Getting started, you can get statistics for your bot through our API.

Number of user sessions

To get the number of user sessions for your bot, make a GET request to https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/sessions/total with your API key as a header authorization key.

An example request using cURL is shown below:

Shell
|
curl -X GET -H "Authorization: YOUR-API-KEY" \
https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/sessions/total?from=YYYY-MM-DD&to=YYYY-MM-DD


Number of user queries received

To get the number of user queries (messages) sent to your bot, make a GET request to https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/queries/total with your API key as a header authorization key.

An example request using cURL is shown below:

Shell
|
curl -X GET -H "Authorization: YOUR-API-KEY" \
https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/queries/total?from=YYYY-MM-DD&to=YYYY-MM-DD


Number of queries that went to fallback

To get the number of user queries (messages) sent to your bot which went to fallback, make a GET request to https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/queries/fallbacks with your API key as a header authorization key.

An example request using cURL is shown below:

Shell
|
curl -X GET -H "Authorization: YOUR-API-KEY" \
https://api.kindly.ai/api/v1/bot/YOUR_BOT_ID/stats/queries/fallbacks?from=YYYY-MM-DD&to=YYYY-MM-DD


Pagination & filtering

By appending query parameters from and to formatted as YYYY-MM-DD, you can control the date range of the stats.

Updated 05 Sep 2022
Did this page help you?
Yes
No
UP NEXT
APIs Changelog
Docs powered by archbee 
TABLE OF CONTENTS
⚠ Deprecated API
API key
Number of user sessions
Number of user queries received
Number of queries that went to fallback
Pagination & filtering