Get outcomes for every agent
curl --request GET \
--url https://api.totebot.ai/v1/team/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/team/analytics"
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/team/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://api.totebot.ai/v1/team/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://api.totebot.ai/v1/team/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://api.totebot.ai/v1/team/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/team/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{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"interval": "day",
"timezone": "Europe/Zagreb",
"total": {
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
]
},
"buckets": [
{
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
],
"start": "2026-11-02"
}
],
"agents": [
{
"agentId": "<string>",
"name": "<string>",
"total": {
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
]
},
"buckets": [
{
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
],
"start": "2026-11-02"
}
]
}
]
}{
"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"
}Analytics
Get outcomes for every agent
The outcomes of every agent in the team and of all of them together. Needs a key that covers all agents. Per bucket: conversations, handover rate, human take-overs, thumbs up/down rate, no-search and empty-search rate, tickets and mean resolution hours, conversion rate and attributed revenue per currency. Conversation metrics count in the bucket the conversation started in, tickets in the bucket they were opened in, orders in the bucket they were attributed in. Rates are null when there is nothing to divide by. Default range: the last 30 days by day in UTC; at most 400 buckets.
GET
/
v1
/
team
/
analytics
Get outcomes for every agent
curl --request GET \
--url https://api.totebot.ai/v1/team/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/team/analytics"
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/team/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://api.totebot.ai/v1/team/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://api.totebot.ai/v1/team/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://api.totebot.ai/v1/team/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/team/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{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"interval": "day",
"timezone": "Europe/Zagreb",
"total": {
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
]
},
"buckets": [
{
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
],
"start": "2026-11-02"
}
],
"agents": [
{
"agentId": "<string>",
"name": "<string>",
"total": {
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
]
},
"buckets": [
{
"conversations": 123,
"handovers": 123,
"handoverRate": 0.5,
"humanTakeovers": 123,
"replies": 123,
"thumbsUp": 123,
"thumbsDown": 123,
"thumbsUpRate": 0.5,
"thumbsDownRate": 0.5,
"userTurns": 123,
"searches": 123,
"emptySearches": 123,
"noSearchRate": 0.5,
"emptySearchRate": 0.5,
"tickets": 123,
"resolvedTickets": 123,
"avgResolutionHours": 123,
"convertedConversations": 123,
"conversionRate": 0.5,
"orders": 123,
"revenue": [
{
"currency": "EUR",
"amount": 1249.5,
"orders": 14
}
],
"start": "2026-11-02"
}
]
}
]
}{
"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"
}