Analytics overview
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/analytics/overview \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/analytics/overview"
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.lehar.ai/ca/api/v0/analytics/overview', 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.lehar.ai/ca/api/v0/analytics/overview",
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.lehar.ai/ca/api/v0/analytics/overview"
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.lehar.ai/ca/api/v0/analytics/overview")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/analytics/overview")
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{
"data": {
"range": {
"from": "2026-08-01",
"to": "2026-08-11"
},
"tiles": {
"attempts": {
"value": 1284,
"delta_pct": 12.4
},
"connect_rate": {
"value": 0.6231,
"delta_pct": -3.1
},
"avg_duration_s": {
"value": 96.4,
"delta_pct": 1.8
},
"cost_credits": {
"value": 812.55,
"delta_pct": 9.7
}
},
"outcomes": {
"completed": 742,
"no_media": 38,
"no_answer": 301,
"busy": 44,
"declined": 61,
"failed": 52,
"user_disconnected": 40,
"expired": 6
},
"latency": {
"p50_ms": 940,
"p95_ms": 2180,
"sessions": 742
}
}
}Analytics
Analytics overview
Volume, connect rate, duration, cost and latency across the workspace for a date range, with deltas against the preceding range of equal length. Scope analytics:read.
GET
/
analytics
/
overview
Analytics overview
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/analytics/overview \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/analytics/overview"
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.lehar.ai/ca/api/v0/analytics/overview', 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.lehar.ai/ca/api/v0/analytics/overview",
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.lehar.ai/ca/api/v0/analytics/overview"
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.lehar.ai/ca/api/v0/analytics/overview")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/analytics/overview")
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{
"data": {
"range": {
"from": "2026-08-01",
"to": "2026-08-11"
},
"tiles": {
"attempts": {
"value": 1284,
"delta_pct": 12.4
},
"connect_rate": {
"value": 0.6231,
"delta_pct": -3.1
},
"avg_duration_s": {
"value": 96.4,
"delta_pct": 1.8
},
"cost_credits": {
"value": 812.55,
"delta_pct": 9.7
}
},
"outcomes": {
"completed": 742,
"no_media": 38,
"no_answer": 301,
"busy": 44,
"declined": 61,
"failed": 52,
"user_disconnected": 40,
"expired": 6
},
"latency": {
"p50_ms": 940,
"p95_ms": 2180,
"sessions": 742
}
}
}Authorizations
ApiKeyAuthBearerAuth
Query Parameters
Inclusive UTC day. Defaults to 7 days before to.
Inclusive UTC day. Defaults to today. Max span 400 days.
Response
200 - application/json
Overview tiles, outcome counts and latency percentiles

