Get assistant caller stats
Returns a breakdown of assistant query counts by caller type (web, API, and other) for the specified date range.
Authenticate with an admin API key.
Use this endpoint to see how the system distributes assistant queries across different caller types. The response breaks down total queries into:
web: Queries from the documentation siteapi: Queries from direct API callsother: Queries from other sources (for example, integrations, SDKs)- total: Sum of all query types
Filtering
Section titled “Filtering”Filter by date range using dateFrom and dateTo parameters.
Rate limits
Section titled “Rate limits”This endpoint allows 100 requests per organization per hour. All analytics endpoints share this limit.
Related topics
/v1/analytics/{projectId}/assistant/caller-statsGet assistant caller stats
3 parameters
- projectIdstringpathrequired
- dateFromstringquery
- dateTostringquery
curl --request GET \
--url https://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: "GET", headers: {"Authorization": "Bearer <token>"}};
fetch("https://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-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.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats",
CURLOPT_RETURNTRANSFER => true,
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://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats"
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://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mintlify.com/v1/analytics/{projectId}/assistant/caller-stats")
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{
"web": 123,
"api": 123,
"other": 123,
"total": 123
}{
"error": "<string>",
"details": [
{
"message": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>"
}
]
}Authorizations
Section titled “Authorizations”AuthorizationstringrequiredThe Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.
Path Parameters
Section titled “Path Parameters”projectIdstringrequiredQuery Parameters
Section titled “Query Parameters”dateFrom?stringExample: 2024-01-01
dateTo?stringExample: 2024-01-01
Response
Section titled “Response”200 — Assistant query counts broken down by caller type
webnumberrequiredNumber of assistant queries originating from the web (documentation site).
apinumberrequiredNumber of assistant queries originating from API calls.
othernumberrequiredNumber of assistant queries from other sources (e.g., integrations, SDKs).
totalnumberrequiredTotal assistant queries across all caller types.