Analytics
Track call volume, platform-minute usage, carrier spend, sentiment distribution, and agent performance metrics.
Spend Overview
http
GET /v1/analytics/spendReturns aggregated analytics across calls for the authenticated tenant. Filter by date range, agent, or call status.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
from | string | No | 30 days ago | Inclusive start date in YYYY-MM-DD format |
to | string | No | Today | Inclusive end date in YYYY-MM-DD format |
agent_id | uuid | No | All agents | Restrict metrics to a specific agent |
status | string | No | All statuses | Filter by call status: completed, failed, in_progress |
Example Request
bash
curl "https://api.rymi.live/v1/analytics/spend?from=2026-03-01&to=2026-03-31&agent_id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
json
{
"total_calls": 140,
"completed_calls": 120,
"in_progress_calls": 2,
"average_duration_seconds": 187,
"success_rate": 0.72,
"telecom_costs": {
"total_minutes": 1450,
"cost_usd": 46.50
},
"total_spent": 46.50,
"time_series": [
{
"date": "2026-03-01",
"calls": 8,
"minutes": 34,
"cost": 1.90
}
],
"status_distribution": {
"completed": 120,
"failed": 18,
"in_progress": 2
},
"sentiment_distribution": {
"positive": 40,
"neutral": 61,
"negative": 8,
"unknown": 31
},
"agent_performance": [
{
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"calls": 90,
"minutes": 740.5,
"cost": 25.10
}
],
"drop_off_points": [
{ "bucket": "<30s", "count": 3 },
{ "bucket": "30-60s", "count": 7 },
{ "bucket": "1-3m", "count": 25 },
{ "bucket": "3-5m", "count": 45 },
{ "bucket": ">5m", "count": 60 }
],
"filters": {
"from": "2026-03-01",
"to": "2026-03-31",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"status": null
}
}Response Fields
| Field | Type | Description |
|---|---|---|
total_calls | integer | Total call count matching the filters |
completed_calls | integer | Calls that completed successfully |
in_progress_calls | integer | Calls currently active |
average_duration_seconds | integer | Average call duration in seconds |
success_rate | number | Ratio of completed calls to total calls (0.0–1.0) |
telecom_costs.total_minutes | number | Total billed minutes |
telecom_costs.cost_usd | number | Total carrier cost in USD |
total_spent | number | Total spend in USD |
time_series | array | Daily breakdown of calls, minutes, and cost |
status_distribution | object | Call count grouped by final status |
sentiment_distribution | object | Call count grouped by post-call sentiment |
agent_performance | array | Per-agent breakdown of calls, minutes, and cost |
drop_off_points | array | Call duration histogram showing where calls ended |
filters | object | Echo of applied filters |
Errors
| Status | Meaning |
|---|---|
400 | Invalid date format or filter values |
401 | Missing or invalid API key |
INFO
Analytics data is aggregated from call records plus post-call intelligence. Real-time minute counts may be supplemented from Redis-backed live usage tracking when available.
Cost Scope
telecom_costs.cost_usd and total_spent are derived from each call's recorded total_cost. For self-serve BYOC, this reflects carrier spend only when the connected provider reports costs and the gateway persists them. LLM/STT/TTS provider token-level cost metering is on the roadmap.

