Get contact-level analytics (7 modules)
curl --request GET \
--url https://your-instance.example.com/api/contact-analytics/{contactId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://your-instance.example.com/api/contact-analytics/{contactId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your-instance.example.com/api/contact-analytics/{contactId}', 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://your-instance.example.com/api/contact-analytics/{contactId}",
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://your-instance.example.com/api/contact-analytics/{contactId}"
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://your-instance.example.com/api/contact-analytics/{contactId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact-analytics/{contactId}")
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{
"success": true,
"data": {
"engagement": {
"score": 72,
"trend": "warming",
"label": "Active",
"daysSinceLastInteraction": 2
},
"pipeline": {
"currentStage": "qualified",
"daysInCurrentStage": 4,
"stageHistory": []
},
"calls": {
"total": 8,
"answered": 5,
"unanswered": 3,
"answerRate": 0.625
},
"conversations": {
"total": 4,
"resolved": 3,
"resolutionRate": 0.75,
"csatAverage": 4.6
},
"channels": {
"preferred": "sms",
"ranked": [
"sms",
"email"
],
"breakdown": {
"sms": 12,
"email": 4
}
},
"aiVsHuman": {
"breakdown": {
"AI": 9,
"HUMAN": 7
},
"escalationCount": 1
},
"timeline": {
"total": 47,
"page": 1,
"limit": 25,
"totalPages": 2,
"events": []
}
}
}{
"error": "Contact not found"
}{
"error": "Contact not found"
}{
"error": "Contact not found"
}Contact Analytics
Get contact-level analytics (7 modules)
Aggregates 7 analytics modules for a single contact: engagement score, pipeline position, calls, conversations, channel preferences, AI-vs-human handling and a paginated activity timeline. Results are cached server-side for 5 minutes per contact unless force=true is passed.
GET
/
api
/
contact-analytics
/
{contactId}
Get contact-level analytics (7 modules)
curl --request GET \
--url https://your-instance.example.com/api/contact-analytics/{contactId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://your-instance.example.com/api/contact-analytics/{contactId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your-instance.example.com/api/contact-analytics/{contactId}', 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://your-instance.example.com/api/contact-analytics/{contactId}",
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://your-instance.example.com/api/contact-analytics/{contactId}"
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://your-instance.example.com/api/contact-analytics/{contactId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact-analytics/{contactId}")
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{
"success": true,
"data": {
"engagement": {
"score": 72,
"trend": "warming",
"label": "Active",
"daysSinceLastInteraction": 2
},
"pipeline": {
"currentStage": "qualified",
"daysInCurrentStage": 4,
"stageHistory": []
},
"calls": {
"total": 8,
"answered": 5,
"unanswered": 3,
"answerRate": 0.625
},
"conversations": {
"total": 4,
"resolved": 3,
"resolutionRate": 0.75,
"csatAverage": 4.6
},
"channels": {
"preferred": "sms",
"ranked": [
"sms",
"email"
],
"breakdown": {
"sms": 12,
"email": 4
}
},
"aiVsHuman": {
"breakdown": {
"AI": 9,
"HUMAN": 7
},
"escalationCount": 1
},
"timeline": {
"total": 47,
"page": 1,
"limit": 25,
"totalPages": 2,
"events": []
}
}
}{
"error": "Contact not found"
}{
"error": "Contact not found"
}{
"error": "Contact not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Pass true to bypass the 5-minute in-memory cache (used by the refresh button).
Available options:
true ⌘I