Analytics Aggregated metrics for dashboard charts — action volume, approval rates, model agreement, policy denials, and top agents.
All endpoints require a Bearer token (Authorization: Bearer aira_live_xxxxx) and admin privileges . Base URL: https://api.airaproof.com/api/v1
Analytics endpoints are admin-only. Non-admin API keys will receive a 403 Forbidden response.
GET /api/v1/analytics/actions-over-time
Authorization : Bearer aira_live_xxxxx
Returns action counts grouped by day or week over the specified lookback window. Use this to power volume trend charts.
Parameter Type Required Description periodstring No Grouping period: daily or weekly (default: daily) daysinteger No Lookback window in days (1--365, default: 30)
curl "https://api.airaproof.com/api/v1/analytics/actions-over-time?period=daily&days=14" \
-H "Authorization: Bearer aira_live_xxxxx"
{
"data" : [
{ "date" : "2026-08-06T00:00:00+00:00" , "count" : 42 },
{ "date" : "2026-08-07T00:00:00+00:00" , "count" : 58 },
{ "date" : "2026-08-08T00:00:00+00:00" , "count" : 37 },
{ "date" : "2026-08-09T00:00:00+00:00" , "count" : 61 }
],
"request_id" : "req_01J9K..."
}
Field Type Description dataarray List of date/count objects data[].datestring Truncated date (ISO 8601), grouped by day or week start data[].countinteger Number of actions in this period request_idstring Request ID for tracing
GET /api/v1/analytics/approval-rates
Authorization : Bearer aira_live_xxxxx
Returns action counts bucketed by approval status: approved, denied, and pending review.
Parameter Type Required Description daysinteger No Lookback window in days (1--365, default: 30)
curl "https://api.airaproof.com/api/v1/analytics/approval-rates?days=7" \
-H "Authorization: Bearer aira_live_xxxxx"
{
"approved" : 312 ,
"denied" : 18 ,
"review" : 5 ,
"total" : 335 ,
"request_id" : "req_01J9L..."
}
Field Type Description approvedinteger Actions with status authorized, notarized, or completed deniedinteger Actions with status denied_by_policy or denied_by_human reviewinteger Actions with status pending_approval or pending_review totalinteger Total action count in the window request_idstring Request ID for tracing
GET /api/v1/analytics/model-agreement
Authorization : Bearer aira_live_xxxxx
Returns average disagreement score and consensus decision breakdown for case runs. Only includes case runs where a consensus decision has been reached.
Parameter Type Required Description daysinteger No Lookback window in days (1--365, default: 30)
curl "https://api.airaproof.com/api/v1/analytics/model-agreement?days=30" \
-H "Authorization: Bearer aira_live_xxxxx"
{
"total_cases" : 84 ,
"avg_disagreement" : 0.1237 ,
"by_decision" : {
"APPROVE" : 71 ,
"DENY" : 8 ,
"REVIEW" : 5
},
"request_id" : "req_01J9M..."
}
Field Type Description total_casesinteger Total case runs with a consensus decision avg_disagreementnumber Average disagreement score across cases (0.0 = full agreement, rounded to 4 decimal places). Returns 0.0 when there are no cases by_decisionobject Breakdown of consensus decisions by_decision.APPROVEinteger Cases where the consensus was to approve by_decision.DENYinteger Cases where the consensus was to deny by_decision.REVIEWinteger Cases escalated for human review request_idstring Request ID for tracing
GET /api/v1/analytics/policy-denials
Authorization : Bearer aira_live_xxxxx
Returns action types that have been denied by policy, ranked by denial count (descending). Only action types with at least one policy denial are included. Limited to the top 20 action types.
Parameter Type Required Description daysinteger No Lookback window in days (1--365, default: 30)
curl "https://api.airaproof.com/api/v1/analytics/policy-denials?days=60" \
-H "Authorization: Bearer aira_live_xxxxx"
{
"data" : [
{ "action_type" : "transaction" , "total" : 220 , "denied" : 14 },
{ "action_type" : "data_export" , "total" : 85 , "denied" : 9 },
{ "action_type" : "tool_call" , "total" : 310 , "denied" : 3 }
],
"request_id" : "req_01J9N..."
}
Field Type Description dataarray List of action types with denial counts (max 20, ordered by denied descending) data[].action_typestring The action type (falls back to "unknown" if not set) data[].totalinteger Total actions of this type in the window data[].deniedinteger Actions of this type denied by policy request_idstring Request ID for tracing
GET /api/v1/analytics/top-agents
Authorization : Bearer aira_live_xxxxx
Returns the most active agents ranked by action volume over the specified lookback window.
Parameter Type Required Description daysinteger No Lookback window in days (1--365, default: 30) limitinteger No Maximum number of agents to return (1--50, default: 10)
curl "https://api.airaproof.com/api/v1/analytics/top-agents?days=30&limit=5" \
-H "Authorization: Bearer aira_live_xxxxx"
{
"data" : [
{ "agent_id" : "procurement-agent" , "action_count" : 482 },
{ "agent_id" : "compliance-bot" , "action_count" : 310 },
{ "agent_id" : "invoice-processor" , "action_count" : 198 },
{ "agent_id" : "data-analyst" , "action_count" : 145 },
{ "agent_id" : "support-agent" , "action_count" : 89 }
],
"request_id" : "req_01J9P..."
}
Field Type Description dataarray List of agents ordered by action_count descending data[].agent_idstring The agent identifier data[].action_countinteger Number of actions submitted by this agent in the window request_idstring Request ID for tracing