Get an analysis snapshot
curl --request GET \
--url https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot', 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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot",
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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot"
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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot")
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{
"generatedAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "<string>",
"name": "<string>",
"language": "<string>",
"model": {
"name": "GPT 5 mini",
"value": "gpt-5-mini"
},
"temperature": 123,
"instructions": "<string>",
"instructionsTruncated": true,
"lastTrainedAt": "2023-11-07T05:31:56Z",
"autoRetrainEnabled": true
},
"knowledge": {
"totalSources": 123,
"byTypeAndStatus": [
{
"type": "DOC",
"status": "PENDING",
"count": 123,
"characters": 123
}
],
"failedTotal": 123,
"failed": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"processingError": "<string>"
}
]
},
"gaps": {
"pending": 123,
"resolved": 123,
"dismissed": 123,
"pendingByVerification": [
{
"verification": "<string>",
"count": 123
}
],
"top": [
{
"id": "<string>",
"question": "<string>",
"occurrences": 123,
"verification": "MISSING",
"signals": [
"JUDGE"
]
}
]
},
"answerStats": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"retentionDays": 90,
"retrievalDataAvailable": true,
"retrievalDataFrom": "2023-11-07T05:31:56Z",
"retrievalNote": "<string>",
"turns": {
"customerMessages": 123,
"botReplies": 123,
"withRetrieval": 123,
"withoutRetrieval": 123,
"retrievalShare": 123
},
"searches": {
"total": 123,
"empty": 123,
"failed": 123,
"emptyShare": 123,
"byOrigin": [
{
"origin": "TOOL",
"searches": 123,
"empty": 123,
"failed": 123
}
]
},
"topSources": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"timesReturned": 123
}
],
"neverReturnedSources": {
"total": 123,
"items": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
},
"testQuestions": {
"questions": 123,
"lastCompletedRun": {
"id": "<string>",
"passed": 123,
"total": 123,
"passRate": 123,
"completedAt": "2023-11-07T05:31:56Z"
}
},
"unavailable": [
{
"section": "testQuestions",
"reason": "Needs the quality:read scope."
}
],
"links": {}
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}Analysis
Get an analysis snapshot
One call with what an analysing agent needs to start: agent settings, knowledge by type and status, failed sources, a gap summary, answer stats for the last 30 days and the latest test run. Sections the key or plan cannot see are null and listed in unavailable. links names the detail endpoints.
GET
/
v1
/
agents
/
{agentId}
/
analysis-snapshot
Get an analysis snapshot
curl --request GET \
--url https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot', 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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot",
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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot"
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://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/agents/{agentId}/analysis-snapshot")
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{
"generatedAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "<string>",
"name": "<string>",
"language": "<string>",
"model": {
"name": "GPT 5 mini",
"value": "gpt-5-mini"
},
"temperature": 123,
"instructions": "<string>",
"instructionsTruncated": true,
"lastTrainedAt": "2023-11-07T05:31:56Z",
"autoRetrainEnabled": true
},
"knowledge": {
"totalSources": 123,
"byTypeAndStatus": [
{
"type": "DOC",
"status": "PENDING",
"count": 123,
"characters": 123
}
],
"failedTotal": 123,
"failed": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"processingError": "<string>"
}
]
},
"gaps": {
"pending": 123,
"resolved": 123,
"dismissed": 123,
"pendingByVerification": [
{
"verification": "<string>",
"count": 123
}
],
"top": [
{
"id": "<string>",
"question": "<string>",
"occurrences": 123,
"verification": "MISSING",
"signals": [
"JUDGE"
]
}
]
},
"answerStats": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"retentionDays": 90,
"retrievalDataAvailable": true,
"retrievalDataFrom": "2023-11-07T05:31:56Z",
"retrievalNote": "<string>",
"turns": {
"customerMessages": 123,
"botReplies": 123,
"withRetrieval": 123,
"withoutRetrieval": 123,
"retrievalShare": 123
},
"searches": {
"total": 123,
"empty": 123,
"failed": 123,
"emptyShare": 123,
"byOrigin": [
{
"origin": "TOOL",
"searches": 123,
"empty": 123,
"failed": 123
}
]
},
"topSources": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"timesReturned": 123
}
],
"neverReturnedSources": {
"total": 123,
"items": [
{
"sourceId": "<string>",
"title": "<string>",
"type": "DOC",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
},
"testQuestions": {
"questions": 123,
"lastCompletedRun": {
"id": "<string>",
"passed": 123,
"total": 123,
"passRate": 123,
"completedAt": "2023-11-07T05:31:56Z"
}
},
"unavailable": [
{
"section": "testQuestions",
"reason": "Needs the quality:read scope."
}
],
"links": {}
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}{
"status": "error",
"error": {
"code": "NotFoundException",
"message": "Agent not found",
"details": {}
},
"path": "/v1/agents/clx123",
"timestamp": "2026-11-24T10:00:00.000Z"
}