VoiceGateway

Totals, answer times and stage timings over calls in a range

GET
/api/v1/org/{orgId}/project/{projectId}/call-stats

Authorization

cookievg_session<token>

The console's session cookie, set when you sign in. Every operation accepts it, at the role the operation names.

Path Parameters

orgId*string

Authorised orgId; the server must verify organisation/project ownership before any read.

Length1 <= length
projectId*string

Authorised projectId; the server must verify organisation/project ownership before any read.

Length1 <= length

Query Parameters

from*string

Inclusive UTC start of the range.

Formatdate-time
to*string

Exclusive UTC end of the range.

Formatdate-time

Response Body

Authorised read result. Null means unreported or incomplete, never zero.

application/json
  1. response

Aggregates over every stored call in the range, computed on the server so no client totals pages. Test and design-preview calls are counted separately and left out of the answer and stage figures.

from*string

Inclusive range start, UTC.

Formatdate-time
to*string

Exclusive range end, UTC.

Formatdate-time
complete*boolean

false when retention, an ingest gap or a source outage leaves part of the range unstored; totals are then null rather than an undercount. The server does not detect ingest gaps yet: true means every call stored since the project was connected, not that nothing was lost.

callCount*|

Calls started in the range.

Range0 <= value
byChannel*

Calls in the range by channel, classified as in CallSummary.channel.

byDay*array<>

Calls per UTC day in the range, oldest first, one entry per day including days with none.

byHour*array<>

Calls per UTC hour over the last 168 hours of the range (all of it when shorter), oldest first, one entry per hour including hours with none, each with its median answer, for the Live wire's calls strip. An hour cut by the range's start or end counts only the calls inside the range.

Itemsitems <= 168
answers*

Answer time (caller stops to agent audio) over every measured turn in the range.

issueCounts*

Event issues with a hit in the range by severity, the same groups listIssues returns with kind event. Standing issues are current state, not problems in the range, and are not counted.

anatomyTurns*|

Turns with a transcript or a measured answer: what Turn anatomy counts each stage's turns against.

Range0 <= value
stages*array<>|

Turn anatomy for all agents: one entry per stage that any turn reported. Stages nothing reports are absent, not zero.

chain*array<>|

Every stage a turn passes through for all agents, each its own median duration over the turns that reported it. Stages nothing reports are absent, not zero.

agents*array<>

One row per agent that took calls in the range, plus one with key null for calls no agent is identified on.

Example Request
curl -X GET 'https://example.com/api/v1/org/string/project/string/call-stats?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z'
Example Response
{  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z",  "complete": true,  "callCount": 0,  "byChannel": {    "phone": 0,    "web": 0,    "console": 0,    "local": 0,    "unknown": 0  },  "byDay": [    {      "date": "2019-08-24",      "callCount": 0    }  ],  "byHour": [    {      "hour": "2019-08-24T14:15:22Z",      "callCount": 0,      "answerP50Ms": 0    }  ],  "answers": {    "turns": 0,    "overBudget": 0,    "budgetMs": 1,    "p50Ms": 0,    "p90Ms": 0,    "values": [      {        "ms": 0,        "callId": "string",        "room": "string",        "turn": 0,        "agentKey": "string"      }    ],    "valuesTruncated": true  },  "issueCounts": {    "high": 0,    "medium": 0,    "low": 0,    "info": 0  },  "anatomyTurns": 0,  "stages": [    {      "stage": "string",      "field": "string",      "startMs": 0,      "medianMs": 0,      "p90Ms": 0,      "turns": 0    }  ],  "chain": [    {      "stage": "stt",      "medianMs": 0,      "maxMs": 0,      "turns": 0    }  ],  "agents": [    {      "key": "string",      "name": "string",      "callCount": 0,      "answerTurns": 0,      "answerP50Ms": 0,      "issues": 0,      "models": [        "string"      ],      "providers": [        {          "provider": "string",          "callCount": 0,          "roles": [            {              "role": "stt",              "medianMs": 0,              "turns": 0            }          ]        }      ],      "anatomyTurns": 0,      "stages": [        {          "stage": "string",          "field": "string",          "startMs": 0,          "medianMs": 0,          "p90Ms": 0,          "turns": 0        }      ],      "chain": [        {          "stage": "stt",          "medianMs": 0,          "maxMs": 0,          "turns": 0        }      ],      "calls": [        {          "callId": "string",          "room": "string",          "answerP50Ms": 0        }      ],      "callsTruncated": true    }  ]}

Was this page helpful?