Calls

Get aggregate call statistics for the org

GET
/api/calls/statistics

Returns aggregate counters (totalCalls, totalDuration, averageDuration) plus per-status breakdowns for the org. Filterable by startDate / endDate (ISO strings applied to createdAt).

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

startDate?string

ISO start of the reporting window.

Formatdate-time
endDate?string

ISO end of the reporting window.

Formatdate-time

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/calls/statistics"
{  "success": true,  "statistics": {    "totalCalls": 124,    "totalDuration": 18450,    "averageDuration": 148.79,    "byStatus": {      "completed": {        "count": 102,        "totalDuration": 17800,        "avgDuration": 174.5      },      "no-answer": {        "count": 18,        "totalDuration": 0,        "avgDuration": 0      },      "failed": {        "count": 4,        "totalDuration": 650,        "avgDuration": 162.5      }    }  }}