Get workspace usage analytics
usage:readAuthenticationReturns non-eval call, tool, webhook, and inference usage for the authenticated workspace. Defaults to the trailing 30 days. Supply range or from, never both; to is exclusive and cannot be in the future. Hour grain is limited to 45 days and every range is limited to 366 days. Series buckets are hour, day, week or month; week buckets start Monday. Custom from boundaries are exact, even when they fall inside a bucket. Call filters combine with AND across dimensions and OR within each comma-separated list (at most 50 values). Agent UUIDs include all historical versions. With call filters, tool/webhook counters and retained inference events are attributed through the selected sessions; unlinked requests and workspace-only request rollups are excluded. Phone filters cannot match anonymized calls after their phone fields are purged. Quota and live capacity endpoints always remain workspace-wide.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
range?string"30d""24h""7d""30d""90d""12m"from?stringInclusive RFC3339 timestamp or YYYY-MM-DD. Mutually exclusive with range.
to?stringExclusive RFC3339 timestamp or YYYY-MM-DD. Defaults to now and cannot be in the future.
grain?stringBucket size for the series. Defaults according to the selected range (hour, day or month); week is available but never chosen for you, so an existing integration's buckets do not change shape. Week buckets start Monday.
"hour""day""week""month"agent_ids?array<>Comma-separated agent UUIDs. Matches all versions of each agent.
items <= 50platform_numbers?array<>Comma-separated exact platform phone numbers, including the leading plus.
items <= 50caller_number?stringLiteral substring of the customer phone number; percent and underscore are not wildcards.
1 <= length <= 100directions?array<>Comma-separated allowed values; OR within this dimension.
items <= 50channels?array<>Comma-separated allowed values; OR within this dimension.
items <= 50handled_by?array<>Comma-separated allowed values; OR within this dimension.
items <= 50statuses?array<>Comma-separated allowed values; OR within this dimension.
items <= 50Eval-free analytics totals and time series for this workspace.
application/json- response
from*stringdate-timeto*stringdate-timegrain*string"hour""day""week""month"scope*totals*series*array<>curl -X GET 'https://api.kejue.co/v1/usage/analytics'{ "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "grain": "hour", "scope": { "kind": "org", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "org_name": "string" }, "totals": { "calls": 0, "failed_calls": 0, "answered_calls": 0, "call_failure_rate": 0, "call_minutes": 0, "avg_minutes_per_call": 0, "active_live_calls": 0, "peak_concurrent_calls": 0, "tool_calls": 0, "tool_failures": 0, "tool_failure_rate": 0, "webhook_deliveries": 0, "webhook_failures": 0, "webhook_failure_rate": 0, "usage_events": 0, "usage_failures": 0, "usage_failure_rate": 0, "total_tokens": 0, "audio_minutes": 0, "tts_characters": 0, "failover_events": 0, "p95_usage_latency_ms": 0, "p95_voice_response_latency_ms": 0, "p95_voice_slm_ttft_ms": 0, "avg_slm_duty_cycle": 0, "avg_duty_cycle": 0 }, "series": [ { "bucket_start": "2019-08-24T14:15:22Z", "calls": 0, "failed_calls": 0, "call_minutes": 0, "concurrent_calls": 0, "slm_duty_cycle": 0, "tool_calls": 0, "tool_failures": 0, "webhook_deliveries": 0, "webhook_failures": 0, "usage_events": 0, "usage_failures": 0 } ]}