Reports
Base path: /reports
Aggregated, pre-computed analytics for your own account — powers the dashboard’s Reports page, also usable directly for your own BI.
Spend trend
GET /reports/spend-trend?period=30
period is days: 7, 30, or 90. Returns one row per day (zero-filled for quiet days):
[
{ "date": "2026-06-15", "label": "15 Jun", "spend_kes": 12.5, "sms_count": 25, "cost_per_sms": 0.5 }
]Campaign performance
GET /reports/campaign-performance
Every non-draft campaign, with delivery rate and cost-per-delivered-SMS computed:
[
{
"id": "...", "name": "July Promo", "status": "completed",
"group_name": "VIP Customers",
"total_recipients": 500, "total_delivered": 480, "total_failed": 12,
"cost_kes": 240.0, "delivery_rate": 96.0, "cost_per_delivered": 0.5,
"created_at": "2026-07-01T09:00:00Z"
}
]Group performance
GET /reports/group-performance
Only contact groups that have had at least one campaign sent to them — groups with zero campaigns are omitted (nothing to report):
[
{
"id": "...", "name": "VIP Customers", "campaign_count": 4,
"total_recipients": 2000, "total_delivered": 1920, "total_failed": 40,
"total_spend": 960.0, "avg_delivery_rate": 96.0
}
]Last updated on