Statistics
The ID of the chatbot
The Id of the channel for which to retrieve statistics for.
The start date of the statistics timeframe (ISO format).
2025-01-04T23:00:00.000ZThe end date of the statistics timeframe (ISO format).
2025-02-01T22:59:59.999ZSets the interval per day or hour in seconds (86400 for multiple days reports and 3600 for single day reports)
Comma-separated list of component IDs.
0: STEP_EXEC_COUNT_FOR_CHANNEL_ID1: CONVERSATION_COUNT_FOR_CHANNEL_ID2: CONVERSATION_COUNT_INTERVAL_FOR_CHANNEL_ID3: CONVERSATION_COUNT_PERIODIC_TREND_FOR_CHANNEL_ID4: CONVERSATION_LANGUAGES_FOR_CHANNEL_ID5: CONVERSATION_MESSAGE_COUNT_MEDIAN_FOR_CHANNEL_ID6: INTENT_COUNT_FOR_CHANNEL_ID7: INTENT_HITS_FOR_CHANNEL_ID8: INTENT_SCORE_MEDIAN_FOR_CHANNEL_ID9: INTERACTION_COUNT_FOR_CHANNEL_ID10: INTERACTION_COUNT_INTERVAL_FOR_CHANNEL_ID11: INTERACTION_COUNT_PERIODIC_TREND_FOR_CHANNEL_ID12: MESSAGE_COUNT_FOR_CHANNEL_ID13: MESSAGE_COUNT_INTERVAL_FOR_CHANNEL_ID14: MESSAGE_COUNT_PERIODIC_TREND_FOR_CHANNEL_ID15: MESSAGE_LENGTH_MEDIAN_FOR_CHANNEL_ID16: CALL_DURATION_TOTAL17: CALL_DURATION_PERIODIC_TREND18: CALL_DURATION_MEDIAN19: CALL_EXIT_STEP20: CALL_USER_INPUTS_MEDIAN21: CALL_END_REASON22: CALL_TRANSFER_TARGET
0,1,2The report structure depends on the requested components.
GET /v1/chatbots/{chatbotId}/statistics/reports/channel?channelId=text&from=2025-01-04T23%3A00%3A00.000Z&to=2025-02-01T22%3A59%3A59.999Z&interval=86400&components=0%2C1%2C2 HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
The report structure depends on the requested components.
{}The ID of the chatbot
The start date of the statistics timeframe (ISO format).
2025-01-04T23:00:00.000ZThe end date of the statistics timeframe (ISO format).
2025-02-01T22:59:59.999ZSets the interval per day or hour in seconds (86400 for multiple days reports and 3600 for single day reports)
Comma-separated list of component IDs.
0: STEP_EXEC_COUNT1: CONVERSATION_COUNT2: CONVERSATION_COUNT_INTERVAL3: CONVERSATION_LANGUAGES4: CONVERSATION_BY_CHANNEL_TYPE5: CONVERSATION_COUNT_PERIODIC_TREND6: CONVERSATION_MESSAGE_COUNT_MEDIAN7: MESSAGE_COUNT8: MESSAGE_COUNT_INTERVAL9: MESSAGE_COUNT_PERIODIC_TREND10: MESSAGE_LENGTH_MEDIAN11: INTENT_HITS12: INTENT_SCORE_MEDIAN13: INTENT_COUNT14: INTERACTION_COUNT15: INTERACTION_COUNT_INTERVAL16: INTERACTION_COUNT_PERIODIC_TREND
0,1,2The report structure depends on the requested components.
GET /v1/chatbots/{chatbotId}/statistics/reports/overview?from=2025-01-04T23%3A00%3A00.000Z&to=2025-02-01T22%3A59%3A59.999Z&interval=86400&components=0%2C1%2C2 HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
The report structure depends on the requested components.
{}The ID of the chatbot
The start date of the statistics timeframe (ISO format).
2025-01-04T23:00:00.000ZThe end date of the statistics timeframe (ISO format).
2025-02-01T22:59:59.999ZExport job has been started.
The ID of the started export job.
stsXOuKC7E4oNjym4Uy1Optional error message.
POST /v1/chatbots/{chatbotId}/statistics/export?from=2025-01-04T23%3A00%3A00.000Z&to=2025-02-01T22%3A59%3A59.999Z HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
Export job has been started.
{
"exportId": "stsXOuKC7E4oNjym4Uy1",
"error": "text"
}The ID of the chatbot
The Id of the export job.
The current status of the export job.
The status of the export.
completedURL to download the file when the export is completed.
https://storage.googleapis.com/exports/export-123.csvOptional error message.
GET /v1/chatbots/{chatbotId}/statistics/export/{exportId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
The current status of the export job.
{
"status": "completed",
"downloadUrl": "https://storage.googleapis.com/exports/export-123.csv",
"error": "text"
}The ID of the chatbot
The start date of the statistics timeframe (ISO format).
2025-01-04T23:00:00.000ZThe end date of the statistics timeframe (ISO format).
2025-02-01T22:59:59.999ZThe inbox statistics data.
Optional error message.
GET /v1/chatbots/{chatbotId}/statistics/inbox?from=2025-01-04T23%3A00%3A00.000Z&to=2025-02-01T22%3A59%3A59.999Z HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
The inbox statistics data.
{
"data": {
"transferredToAgentCount": 150,
"conversationAcceptedCount": 120,
"conversationNotAcceptedCount": 30,
"averageJoinTimeSeconds": 60,
"agentPerformance": [
{
"operatorId": "op_abc123xyz",
"acceptedCount": 25,
"avgJoinTimeSeconds": 45.5,
"operatorName": "John Doe"
}
]
},
"error": "text"
}The ID of the chatbot
The list of channels for the chatbot.
Internal server error, e.g. if the channel service is unavailable.
GET /v1/chatbots/{chatbotId}/statistics/channels HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"channels": [
{
"channelId": "656DSztzc13rF",
"channelName": "Web Support",
"channelType": "voice"
}
]
}Last updated