Get analytics
curl --request GET \
--url https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"analytics": {
"startDay": "2026-07-28",
"endDay": "2026-08-26",
"insightsEnabled": true,
"days": [
{
"day": "2026-08-26",
"widgetOpens": 42,
"messages": 18,
"aiMessages": 18,
"positiveReactions": 3,
"negativeReactions": 0,
"threadsStarted": 9,
"uniqueVisitors": 8,
"escalations": 1,
"leads": 2,
"unansweredTurns": 1,
"sentimentNegative": 1,
"resolvedByAi": 6,
"handedOff": 1,
"classifiedThreads": 7
}
],
"totals": {
"widgetOpens": 1180,
"messages": 640,
"aiMessages": 640,
"positiveReactions": 88,
"negativeReactions": 6,
"threadsStarted": 240,
"uniqueVisitors": 210,
"escalations": 14,
"leads": 31,
"unansweredTurns": 12,
"sentimentNegative": 9,
"resolvedByAi": 180,
"handedOff": 22,
"classifiedThreads": 205
},
"prior": {
"widgetOpens": 1050,
"messages": 590,
"aiMessages": 590,
"positiveReactions": 74,
"negativeReactions": 9,
"threadsStarted": 221,
"uniqueVisitors": 195,
"escalations": 17,
"leads": 26,
"unansweredTurns": 15,
"sentimentNegative": 11,
"resolvedByAi": 160,
"handedOff": 25,
"classifiedThreads": 188
}
}
},
"meta": {
"requestId": "request-id"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}Chatbots
Get analytics
Get daily engagement analytics: widget opens, conversations, messages, reactions, unique visitors, escalations, and leads, with totals and a prior-period comparison. Requires analytics to be enabled for the account (403 ANALYTICS_LOCKED otherwise); insight-derived counters appear only when insights is enabled.
Required scope: chatbots:read.
On success, data contains: analytics.
GET
/
api
/
v2
/
chatbots
/
{chatbotId}
/
analytics
Get analytics
curl --request GET \
--url https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitegpt.ai/api/v2/chatbots/{chatbotId}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"analytics": {
"startDay": "2026-07-28",
"endDay": "2026-08-26",
"insightsEnabled": true,
"days": [
{
"day": "2026-08-26",
"widgetOpens": 42,
"messages": 18,
"aiMessages": 18,
"positiveReactions": 3,
"negativeReactions": 0,
"threadsStarted": 9,
"uniqueVisitors": 8,
"escalations": 1,
"leads": 2,
"unansweredTurns": 1,
"sentimentNegative": 1,
"resolvedByAi": 6,
"handedOff": 1,
"classifiedThreads": 7
}
],
"totals": {
"widgetOpens": 1180,
"messages": 640,
"aiMessages": 640,
"positiveReactions": 88,
"negativeReactions": 6,
"threadsStarted": 240,
"uniqueVisitors": 210,
"escalations": 14,
"leads": 31,
"unansweredTurns": 12,
"sentimentNegative": 9,
"resolvedByAi": 180,
"handedOff": 22,
"classifiedThreads": 205
},
"prior": {
"widgetOpens": 1050,
"messages": 590,
"aiMessages": 590,
"positiveReactions": 74,
"negativeReactions": 9,
"threadsStarted": 221,
"uniqueVisitors": 195,
"escalations": 17,
"leads": 26,
"unansweredTurns": 15,
"sentimentNegative": 11,
"resolvedByAi": 160,
"handedOff": 25,
"classifiedThreads": 188
}
}
},
"meta": {
"requestId": "request-id"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"requestId": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Chatbot ID.
Query Parameters
First UTC day of the range (YYYY-MM-DD). Defaults to a trailing 30-day window ending at endDay.
Last UTC day of the range (YYYY-MM-DD). Defaults to today (UTC). The range spans at most 366 days.
Was this page helpful?
⌘I