Get Daily Calls
curl --request GET \
--url https://api.example.com/api/analytics/calls/dailyimport requests
url = "https://api.example.com/api/analytics/calls/daily"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/analytics/calls/daily', 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.example.com/api/analytics/calls/daily",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/analytics/calls/daily"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/analytics/calls/daily")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analytics/calls/daily")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": {},
"granularity": "<string>",
"daily": [
{
"date": "<string>",
"calls": 123,
"cost_credits": 123,
"total_duration_seconds": 123
}
]
}
}Analytics
Get Daily Calls
Retrieve time-series call metrics over a specified period.
GET
/
api
/
analytics
/
calls
/
daily
Get Daily Calls
curl --request GET \
--url https://api.example.com/api/analytics/calls/dailyimport requests
url = "https://api.example.com/api/analytics/calls/daily"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/analytics/calls/daily', 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.example.com/api/analytics/calls/daily",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/analytics/calls/daily"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/analytics/calls/daily")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analytics/calls/daily")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": {},
"granularity": "<string>",
"daily": [
{
"date": "<string>",
"calls": 123,
"cost_credits": 123,
"total_duration_seconds": 123
}
]
}
}Provides an array of metrics grouped by time interval (either days or minutes depending on your parameters). This is ideal for generating line charts of call volume and duration.
Query Parameters
string
Start date in
YYYY-MM-DD format. Defaults to 30 days ago.string
End date in
YYYY-MM-DD format. Defaults to today.string
Start exact time in ISO 8601 format (e.g.
2024-03-01T14:30:00Z). Changes the granularity of the time-series points to minute.string
End exact time in ISO 8601 format.
string
Filter the metrics to only include calls for a specific agent.
Response
boolean
Indicates whether the request was successful.
object
Show properties
Show properties
object
The start and end boundaries of the query.
string
The time grouping used for the data points. Either
day or minute.