Skip to content

Get analytics

get/get-analysis/{chatbotId}
Any key

Get the aggregated statistics of a chatbot.

Parameters

Sending 1 of 4 fields
Required
chatbotIdstring
The unique identifier allocated to the chatbot.
Try it · GET /get-analysis/{chatbotId}
curl 'https://api.chat-data.com/api/v2/get-analysis/6650f1c2a9e4b83d2c7a1f05' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
Loading…

Responses

Successful response.

Content type: application/json

FieldDescription
statusstringOne of: success.
countryDistributionarray of objectMessages per user country, most messages first.
countryDistribution[].countrystringThe 2-letter ISO country code from the IP address lookup (Unknown when it could not be resolved).
countryDistribution[].countnumberThe number of messages for users from this country within the specified date range.
hourDistributionarray of objectMessages per UTC hour and source, ordered by hour.
hourDistribution[].hourstringThe UTC hour when the messages occurred.
hourDistribution[].sourcestringThe source of the messages. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
hourDistribution[].countnumberThe number of messages during this UTC hour within the specified date range.
creditsDistributionarray of objectOne entry per day and source, oldest first.
creditsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
creditsDistribution[].sourcestringThe source where message credits were consumed. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
creditsDistribution[].countnumberThe number of message credits consumed on the specified date.
messagesDistributionarray of objectOne entry per day and source, oldest first.
messagesDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
messagesDistribution[].sourcestringThe source where the messages were sent. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
messagesDistribution[].countnumberThe number of messages sent on the specified date.
liveChatEmailsDistributionarray of objectOne entry per day and source, oldest first.
liveChatEmailsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
liveChatEmailsDistribution[].sourcestringThe source where the live chat emails were sent. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
liveChatEmailsDistribution[].countnumberThe number of live chat emails sent on the specified date.
liveChatSmsDistributionarray of objectOne entry per day and source, oldest first.
liveChatSmsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
liveChatSmsDistribution[].sourcestringThe source where the live chat SMS messages were sent. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
liveChatSmsDistribution[].countnumberThe number of live chat SMS messages sent on the specified date.
liveChatEscalationsDistributionarray of objectOne entry per day and source, oldest first.
liveChatEscalationsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
liveChatEscalationsDistribution[].sourcestringThe source where the live chat escalations happened. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
liveChatEscalationsDistribution[].countnumberThe number of live chat escalations on the specified date.
upVotesDistributionarray of objectOne entry per day and source, oldest first.
upVotesDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
upVotesDistribution[].sourcestringThe source where the upvotes occurred. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
upVotesDistribution[].countnumberThe number of upvotes on the specified date.
downVotesDistributionarray of objectOne entry per day and source, oldest first.
downVotesDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
downVotesDistribution[].sourcestringThe source where the downvotes occurred. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
downVotesDistribution[].countnumberThe number of downvotes on the specified date.
conversationsDistributionarray of objectOne entry per day and source, oldest first.
conversationsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
conversationsDistribution[].sourcestringThe source where the conversations started. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
conversationsDistribution[].countnumberThe number of conversations started on the specified date.
leadsCountDistributionarray of objectOne entry per day and source, oldest first.
leadsCountDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
leadsCountDistribution[].sourcestringThe source where the leads were collected. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
leadsCountDistribution[].countnumberThe number of leads collected on the specified date.
workflowEmailsDistributionarray of objectOne entry per day and source, oldest first.
workflowEmailsDistribution[].datenumberThe day, as a timestamp in milliseconds since the Unix epoch.
workflowEmailsDistribution[].sourcestringThe source where the workflow emails were sent. One of: widget, iframe, site, api, Whatsapp, WhatsappWebAPI, Messenger, Instagram, Telegram, Line, Slack, Discord, Workflow Studio, cron-trigger, youtube-transcription, image-description-test, metering.
workflowEmailsDistribution[].countnumberThe number of workflow emails sent on the specified date.
topicsDistributionarray of objectTotals per topic, highest count first.
topicsDistribution[].topicstringThe topic name.
topicsDistribution[].countnumberThe number of user messages classified with this topic.
sentimentsDistributionarray of objectTotals per sentiment, highest count first.
sentimentsDistribution[].sentimentstringThe sentiment value (for example positive, negative or neutral).
sentimentsDistribution[].countnumberThe number of user messages classified with this sentiment.
ratingDistributionarray of objectTotals per rating, highest count first.
ratingDistribution[].ratingstringThe rating value (1-5).
ratingDistribution[].countnumberThe number of conversations with this rating.

Example

{  "status": "success",  "countryDistribution": [    {      "country": "US",      "count": 184    },    {      "country": "GB",      "count": 61    }  ],  "hourDistribution": [    {      "hour": "14",      "source": "iframe",      "count": 37    },    {      "hour": "15",      "source": "iframe",      "count": 29    }  ],  "creditsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 96    },    {      "date": 1791936000000,      "source": "iframe",      "count": 412    }  ],  "messagesDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 88    },    {      "date": 1791936000000,      "source": "iframe",      "count": 356    }  ],  "liveChatEmailsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 1    },    {      "date": 1791936000000,      "source": "iframe",      "count": 3    }  ],  "liveChatSmsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 0    },    {      "date": 1791936000000,      "source": "iframe",      "count": 2    }  ],  "liveChatEscalationsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 1    },    {      "date": 1791936000000,      "source": "iframe",      "count": 4    }  ],  "upVotesDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 6    },    {      "date": 1791936000000,      "source": "iframe",      "count": 21    }  ],  "downVotesDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 1    },    {      "date": 1791936000000,      "source": "iframe",      "count": 4    }  ],  "conversationsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 14    },    {      "date": 1791936000000,      "source": "iframe",      "count": 58    }  ],  "leadsCountDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 2    },    {      "date": 1791936000000,      "source": "iframe",      "count": 9    }  ],  "workflowEmailsDistribution": [    {      "date": 1791849600000,      "source": "api",      "count": 1    },    {      "date": 1791936000000,      "source": "iframe",      "count": 5    }  ],  "topicsDistribution": [    {      "topic": "Pricing",      "count": 26    },    {      "topic": "Shipping",      "count": 17    }  ],  "sentimentsDistribution": [    {      "sentiment": "positive",      "count": 41    },    {      "sentiment": "neutral",      "count": 12    }  ],  "ratingDistribution": [    {      "rating": "5",      "count": 19    },    {      "rating": "4",      "count": 7    }  ]}

Last updated October 14, 2026