cURL
curl --request GET \ --url https://api.example.com/v1/analytics/overview \ --header 'X-API-Key: <x-api-key>'
{ "success": true, "tenant_id": "<string>", "period": { "start": "<string>", "end": "<string>" }, "total_sms_sent": 123, "total_sms_received": 123, "total_mms_sent": 123, "total_mms_received": 123, "total_voice_calls": 123, "total_voice_seconds": 123, "total_cost": 123, "cost_breakdown": { "messaging_cost": 123, "voice_cost": 123, "api_request_cost": 123, "api_requests_count": 123, "api_storage_cost": 123, "phone_rental_cost": 123, "phone_rental_count": 123, "phone_purchase_cost": 123, "phone_purchase_count": 123, "brand_registration_cost": 123, "brand_registration_count": 123, "kb_cost": 123, "kb_monthly_cost": 123, "kb_usage_cost": 123, "kb_count": 123, "kb_minutes": 123 }, "organizations_count": 123, "users_count": 123 }
Get tenant-level analytics overview with usage counts and cost breakdown
Show properties
curl -X GET "https://api.teli.ai/v1/analytics/overview?start_date=2024-01-01&end_date=2024-01-31" \ -H "X-API-Key: your-api-key"
{ "success": true, "tenant_id": "your_tenant", "period": { "start": "2024-01-01", "end": "2024-01-31" }, "total_sms_sent": 15420, "total_sms_received": 3250, "total_mms_sent": 520, "total_mms_received": 180, "total_voice_calls": 2340, "total_voice_seconds": 142560, "total_cost": 1245.67, "cost_breakdown": { "messaging_cost": 845.50, "voice_cost": 285.12, "api_request_cost": 40.00, "api_requests_count": 1000000, "api_storage_cost": 15.00, "phone_rental_cost": 29.90, "phone_rental_count": 10, "phone_purchase_cost": 5.00, "phone_purchase_count": 5, "brand_registration_cost": 12.00, "brand_registration_count": 3, "kb_cost": 13.15, "kb_monthly_cost": 10.00, "kb_usage_cost": 3.15, "kb_count": 2, "kb_minutes": 315.5 }, "organizations_count": 5, "users_count": 23 }