Get Org Conversation Usage Stats
curl --request GET \
--url https://api.example.com/api/organizations/{org_id}/conversations/usage-stats \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.example.com/api/organizations/{org_id}/conversations/usage-stats"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.example.com/api/organizations/{org_id}/conversations/usage-stats', 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/organizations/{org_id}/conversations/usage-stats",
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-Access-Token: <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.example.com/api/organizations/{org_id}/conversations/usage-stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<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.example.com/api/organizations/{org_id}/conversations/usage-stats")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/organizations/{org_id}/conversations/usage-stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active_users": 0,
"agent_runs": 0,
"usage_conversation_count": 0,
"total_tokens": 0,
"estimated_spend": 0,
"daily_usage": [
{
"date": "<string>",
"tokens": 0,
"conversations": 0
}
],
"team_usage": [
{
"user_id": "<string>",
"user_email": "<string>",
"user_name": "<string>",
"conversation_count": 0,
"total_tokens": 0,
"percentage": 0
}
],
"model_usage": [
{
"model_name": "<string>",
"conversation_count": 0,
"total_tokens": 0,
"total_cost": 0
}
],
"agent_usage": [
{
"agent_name": "<string>",
"conversation_count": 0,
"total_cost": 0
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Orgs
Get Org Conversation Usage Stats
Get detailed usage statistics for organization dashboard.
Returns detailed metrics including active users, agent runs, token usage, daily breakdown, and team usage for the specified time window.
Access Control: Requires VIEW_ORG_CONVERSATIONS permission (Admin or Owner role).
Args: org_id: The organization ID time_window: Time window filter (7d, 30d, 90d, ytd) days: Number of days to look back (default 7)
Returns: OrgUsageStats: Detailed usage statistics for the org
GET
/
api
/
organizations
/
{org_id}
/
conversations
/
usage-stats
Get Org Conversation Usage Stats
curl --request GET \
--url https://api.example.com/api/organizations/{org_id}/conversations/usage-stats \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.example.com/api/organizations/{org_id}/conversations/usage-stats"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.example.com/api/organizations/{org_id}/conversations/usage-stats', 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/organizations/{org_id}/conversations/usage-stats",
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-Access-Token: <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.example.com/api/organizations/{org_id}/conversations/usage-stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<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.example.com/api/organizations/{org_id}/conversations/usage-stats")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/organizations/{org_id}/conversations/usage-stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active_users": 0,
"agent_runs": 0,
"usage_conversation_count": 0,
"total_tokens": 0,
"estimated_spend": 0,
"daily_usage": [
{
"date": "<string>",
"tokens": 0,
"conversations": 0
}
],
"team_usage": [
{
"user_id": "<string>",
"user_email": "<string>",
"user_name": "<string>",
"conversation_count": 0,
"total_tokens": 0,
"percentage": 0
}
],
"model_usage": [
{
"model_name": "<string>",
"conversation_count": 0,
"total_tokens": 0,
"total_cost": 0
}
],
"agent_usage": [
{
"agent_name": "<string>",
"conversation_count": 0,
"total_cost": 0
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Headers
Path Parameters
Query Parameters
Options: 7d, 30d, 90d, ytd (overrides days when provided)
Number of days to look back
Required range:
x >= 1Response
Successful Response
Detailed usage statistics for organization dashboard.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

