Dashboard Endpoint
URL |
Required Values |
HTTP Methods |
|---|---|---|
GET |
Authentication: IsCompanyUser (authenticated company user)
Query parameters (optional):
Use this endpoint to fetch dashboard statistics for the current company user. All values are computed over the last days days.
Response body
The response is a JSON object with the following keys:
Sample request
GET /api/v1/dashboard/?days=30
Authorization: Bearer <access_token>
Sample output
{
"total_credits_purchased": 1000,
"credits_used": 450,
"remaining_credits": 550,
"campaigns": {},
"outbound_calls": 1200,
"outbound_sms": 300,
"total_call_duration": "05:30:00",
"total_owned_numbers": 5,
"total_playback": {},
"credit_spent": 0.375,
"top_performing_campaign": {},
"playback_distribution": {},
"campaign_type_ratio": {},
"call_outcomes": {},
"credit_usage_overtime": []
}
The structure and types of nested objects (e.g. campaigns, playback_distribution, call_outcomes) match the underlying sources (get_campaign_stats, get_campaign_type, get_call_outcomes, etc.).