Analytics API
Access clinic performance metrics, appointment statistics, and operational insights.
GET
/v1/analytics/overviewGet a high-level summary of clinic operations for a given time period.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date_from | string | Required | Start date (YYYY-MM-DD) |
| date_to | string | Required | End date (YYYY-MM-DD) |
| doctor_id | string | Optional | Filter by specific doctor |
Example Request
curl -X GET "https://api.relaya.one/v1/analytics/overview?date_from=2026-07-01&date_to=2026-07-25" \
-H "Authorization: Bearer rlya_live_abc123"Example Response
{
"data": {
"period": {
"from": "2026-07-01",
"to": "2026-07-25"
},
"appointments": {
"total": 342,
"completed": 298,
"cancelled": 28,
"no_shows": 16,
"completion_rate": 0.87
},
"patients": {
"total_active": 1240,
"new_registrations": 45,
"returning": 297
},
"voice": {
"total_calls": 189,
"avg_duration_seconds": 96,
"appointments_booked_via_ai": 134,
"transfer_rate": 0.12
},
"scribe": {
"notes_generated": 156,
"notes_approved": 148,
"avg_processing_seconds": 45
}
}
}GET
/v1/analytics/appointmentsGet detailed appointment statistics broken down by day.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date_from | string | Required | Start date (YYYY-MM-DD) |
| date_to | string | Required | End date (YYYY-MM-DD) |
| granularity | string | Optional | Breakdown: day, week, month (default: day) |
| doctor_id | string | Optional | Filter by specific doctor |
Example Response
{
"data": {
"series": [
{
"date": "2026-07-01",
"scheduled": 14,
"completed": 12,
"cancelled": 1,
"no_show": 1
},
{
"date": "2026-07-02",
"scheduled": 16,
"completed": 15,
"cancelled": 0,
"no_show": 1
}
],
"summary": {
"busiest_day": "2026-07-15",
"avg_daily_appointments": 13.7,
"peak_hour": "10:00"
}
}
}GET
/v1/analytics/voiceGet Voice AI performance metrics including call volumes, resolution rates, and common intents.
Example Response
{
"data": {
"period": {
"from": "2026-07-01",
"to": "2026-07-25"
},
"calls": {
"total": 189,
"resolved_by_ai": 166,
"transferred": 23,
"resolution_rate": 0.88
},
"intents": [
{ "intent": "appointment_booking", "count": 98, "success_rate": 0.94 },
{ "intent": "appointment_reschedule", "count": 34, "success_rate": 0.88 },
{ "intent": "general_inquiry", "count": 31, "success_rate": 0.90 },
{ "intent": "cancel_appointment", "count": 18, "success_rate": 1.00 },
{ "intent": "lab_results", "count": 8, "success_rate": 0.75 }
],
"avg_call_duration_seconds": 96,
"satisfaction_score": 4.6
}
}