Get outcomes over time
curl --request GET \
--url https://api.totebot.ai/v1/agents/{agentId}/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/agents/{agentId}/outcomes"
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}/outcomes', 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}/outcomes",
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}/outcomes"
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}/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/agents/{agentId}/outcomes")
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",
"agentId": "<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 over time
How the agent is doing over time, bucketed by day, week or month in timezone. 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
/
agents
/
{agentId}
/
outcomes
Get outcomes over time
curl --request GET \
--url https://api.totebot.ai/v1/agents/{agentId}/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totebot.ai/v1/agents/{agentId}/outcomes"
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}/outcomes', 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}/outcomes",
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}/outcomes"
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}/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totebot.ai/v1/agents/{agentId}/outcomes")
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",
"agentId": "<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"
}