Space usage
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/usage', 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://{space}.{region}.api.niadra.com/v1/usage",
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://{space}.{region}.api.niadra.com/v1/usage"
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://{space}.{region}.api.niadra.com/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/usage")
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{
"since": "2026-09-22T00:00:00Z",
"until": "2026-09-23T00:00:00Z",
"granularity": "day",
"group_by": "source",
"source_id": null,
"items": [
{
"start": "2026-09-22T00:00:00Z",
"metric": "session_billable",
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"quantity": 6120,
"cost_micros": 61200000
},
{
"start": "2026-09-22T00:00:00Z",
"metric": "session_billable",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"quantity": 1340,
"cost_micros": 13400000
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Patterns, measurement and usage
Space usage
Conversations, tasks and events per period, and per source with group_by=source.
GET
/
v1
/
usage
Space usage
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/usage', 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://{space}.{region}.api.niadra.com/v1/usage",
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://{space}.{region}.api.niadra.com/v1/usage"
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://{space}.{region}.api.niadra.com/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/usage")
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{
"since": "2026-09-22T00:00:00Z",
"until": "2026-09-23T00:00:00Z",
"granularity": "day",
"group_by": "source",
"source_id": null,
"items": [
{
"start": "2026-09-22T00:00:00Z",
"metric": "session_billable",
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"quantity": 6120,
"cost_micros": 61200000
},
{
"start": "2026-09-22T00:00:00Z",
"metric": "session_billable",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"quantity": 1340,
"cost_micros": 13400000
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
sourceKeypersonToken
nia_sk_...
Query Parameters
Available options:
hour, day Only these metrics, such as session_billable, context_read, history_call or event_ingested. Up to 20.
Maximum array length:
20source splits every metric by source.
Allowed value:
"source"Response
One item per metric and period, and per source with group_by=source.

