Aggregated call metrics for a time window (authoritative call count)
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/analytics/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/analytics/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.mihu.ai/api/v1/analytics/calls', 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://{subdomain}.mihu.ai/api/v1/analytics/calls",
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://{subdomain}.mihu.ai/api/v1/analytics/calls"
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://{subdomain}.mihu.ai/api/v1/analytics/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/analytics/calls")
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{
"meta": {},
"totals": {
"calls": 123,
"inbound": 123,
"outbound": 123,
"answered": 123,
"missed": 123,
"failed": 123,
"ai_handled": 123,
"human_handled": 123
},
"duration_sec": {},
"buckets": {},
"outcome": {},
"cost": {},
"previous": {}
}Analytics
Aggregated call metrics for a time window (authoritative call count)
Returns volume, direction split, AI vs human handling, durations (seconds), outcomes, and cost for calls within [from, to). This endpoint is the authoritative source for call counts; /api/v1/analytics/conversations totals exclude calls without a resolvable channel via conversations.call_id, so the two counts may differ slightly. Channel filter restricts to call-bearing channels.
GET
/
api
/
v1
/
analytics
/
calls
Aggregated call metrics for a time window (authoritative call count)
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/analytics/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/analytics/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.mihu.ai/api/v1/analytics/calls', 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://{subdomain}.mihu.ai/api/v1/analytics/calls",
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://{subdomain}.mihu.ai/api/v1/analytics/calls"
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://{subdomain}.mihu.ai/api/v1/analytics/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/analytics/calls")
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{
"meta": {},
"totals": {
"calls": 123,
"inbound": 123,
"outbound": 123,
"answered": 123,
"missed": 123,
"failed": 123,
"ai_handled": 123,
"human_handled": 123
},
"duration_sec": {},
"buckets": {},
"outcome": {},
"cost": {},
"previous": {}
}Authorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Query Parameters
Inclusive ISO-8601 start with offset (e.g. 2026-04-01T00:00:00+03:00)
Exclusive ISO-8601 end with offset
Include previous block for the immediately prior window of equal length
Only total is currently supported
Available options:
total Comma-separated channel tokens
Example:
"call,whatsapp_call"
