Get agent performance analytics
curl --request GET \
--url https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents', 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.bitbybit.studio/whatsapp/open/v1/analytics/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.bitbybit.studio/whatsapp/open/v1/analytics/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.bitbybit.studio/whatsapp/open/v1/analytics/agents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"range": {
"start_at": "2026-07-20T00:00:00Z",
"end_at": "2026-07-20T23:59:59Z"
},
"records": [
{
"company_id": 1646,
"agent_id": 12,
"agent_name": "Bu Tika",
"agent_type": "human",
"tickets_handled": 45,
"first_response_time": "00:04:12",
"avg_response_time": "00:06:06",
"resolution_time": "03:30:00",
"last_chat_handled": "2026-07-20T17:42:00Z"
},
{
"company_id": 1646,
"agent_id": -2,
"agent_name": "AI Agent",
"agent_type": "ai",
"tickets_handled": 210,
"first_response_time": "00:00:06",
"avg_response_time": "00:00:18",
"resolution_time": "00:00:48",
"last_chat_handled": "2026-07-20T18:12:00Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "startAt must be a valid ISO 8601 date-time"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or expired API key"
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the analytics:READ scope"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after the reset period."
}
}Analytics
Get Agent Analytics
Returns aggregated CS & ticket performance metrics per agent (both human and AI) for the company associated with the API key, over the requested time window.
The company_id is implicit — it is derived from the API key. To query multiple companies, call this endpoint once per API key.
GET
/
analytics
/
agents
Get agent performance analytics
curl --request GET \
--url https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents', 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.bitbybit.studio/whatsapp/open/v1/analytics/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.bitbybit.studio/whatsapp/open/v1/analytics/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.bitbybit.studio/whatsapp/open/v1/analytics/agents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/whatsapp/open/v1/analytics/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"range": {
"start_at": "2026-07-20T00:00:00Z",
"end_at": "2026-07-20T23:59:59Z"
},
"records": [
{
"company_id": 1646,
"agent_id": 12,
"agent_name": "Bu Tika",
"agent_type": "human",
"tickets_handled": 45,
"first_response_time": "00:04:12",
"avg_response_time": "00:06:06",
"resolution_time": "03:30:00",
"last_chat_handled": "2026-07-20T17:42:00Z"
},
{
"company_id": 1646,
"agent_id": -2,
"agent_name": "AI Agent",
"agent_type": "ai",
"tickets_handled": 210,
"first_response_time": "00:00:06",
"avg_response_time": "00:00:18",
"resolution_time": "00:00:48",
"last_chat_handled": "2026-07-20T18:12:00Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "startAt must be a valid ISO 8601 date-time"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or expired API key"
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the analytics:READ scope"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after the reset period."
}
}Authorizations
API key for authentication. Create one in Settings > Developer with the Analytics READ scope.
Query Parameters
Start of the reporting window (ISO 8601). Inclusive.
End of the reporting window (ISO 8601). Inclusive.
Optional channel filter. Accepts a single value. To combine channels, call the endpoint per channel and merge on your side.
Available options:
whatsapp, whatsapp_cloud_api, whatsapp_coex, instagram, facebook, tiktok, outlook, widget Case-insensitive substring match on the agent display name.

