Closed Beta — Aira is currently invite-only. Request access to join the early program.
Aira

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.


Actions Over Time

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.

Query Parameters

ParameterTypeRequiredDescription
periodstringNoGrouping period: daily or weekly (default: daily)
daysintegerNoLookback window in days (1--365, default: 30)

Example Request

curl "https://api.airaproof.com/api/v1/analytics/actions-over-time?period=daily&days=14" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "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..."
}

Response Fields

FieldTypeDescription
dataarrayList of date/count objects
data[].datestringTruncated date (ISO 8601), grouped by day or week start
data[].countintegerNumber of actions in this period
request_idstringRequest ID for tracing

Approval Rates

GET /api/v1/analytics/approval-rates
Authorization: Bearer aira_live_xxxxx

Returns action counts bucketed by approval status: approved, denied, and pending review.

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoLookback window in days (1--365, default: 30)

Example Request

curl "https://api.airaproof.com/api/v1/analytics/approval-rates?days=7" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "approved": 312,
  "denied": 18,
  "review": 5,
  "total": 335,
  "request_id": "req_01J9L..."
}

Response Fields

FieldTypeDescription
approvedintegerActions with status authorized, notarized, or completed
deniedintegerActions with status denied_by_policy or denied_by_human
reviewintegerActions with status pending_approval or pending_review
totalintegerTotal action count in the window
request_idstringRequest ID for tracing

Model Agreement

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.

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoLookback window in days (1--365, default: 30)

Example Request

curl "https://api.airaproof.com/api/v1/analytics/model-agreement?days=30" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "total_cases": 84,
  "avg_disagreement": 0.1237,
  "by_decision": {
    "APPROVE": 71,
    "DENY": 8,
    "REVIEW": 5
  },
  "request_id": "req_01J9M..."
}

Response Fields

FieldTypeDescription
total_casesintegerTotal case runs with a consensus decision
avg_disagreementnumberAverage disagreement score across cases (0.0 = full agreement, rounded to 4 decimal places). Returns 0.0 when there are no cases
by_decisionobjectBreakdown of consensus decisions
by_decision.APPROVEintegerCases where the consensus was to approve
by_decision.DENYintegerCases where the consensus was to deny
by_decision.REVIEWintegerCases escalated for human review
request_idstringRequest ID for tracing

Policy Denials

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.

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoLookback window in days (1--365, default: 30)

Example Request

curl "https://api.airaproof.com/api/v1/analytics/policy-denials?days=60" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "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..."
}

Response Fields

FieldTypeDescription
dataarrayList of action types with denial counts (max 20, ordered by denied descending)
data[].action_typestringThe action type (falls back to "unknown" if not set)
data[].totalintegerTotal actions of this type in the window
data[].deniedintegerActions of this type denied by policy
request_idstringRequest ID for tracing

Top Agents

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.

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoLookback window in days (1--365, default: 30)
limitintegerNoMaximum number of agents to return (1--50, default: 10)

Example Request

curl "https://api.airaproof.com/api/v1/analytics/top-agents?days=30&limit=5" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "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..."
}

Response Fields

FieldTypeDescription
dataarrayList of agents ordered by action_count descending
data[].agent_idstringThe agent identifier
data[].action_countintegerNumber of actions submitted by this agent in the window
request_idstringRequest ID for tracing

On this page