Skip to content

Callback statistics

GET
/callbacks/stats
import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callbackStats = await mv.callbacks.stats();
console.log(callbackStats);

Totals for callbacks requested in a period (default: the last 7 days): outcomes, SLA, time to return, by source and by agent.

Try it in the API playground with a test-mode key.

from
string format: date-time

Start of the period (default: 7 days before to).

Example
2026-11-03T09:00:00+02:00
to
string format: date-time

End of the period (default: now).

Example
2026-11-03T09:00:00+02:00
queue_id
string
<= 200 characters /^q_[0-9A-Za-z]+$/

A queue ID (q_…).

MoreVoice-Version
string
/^\d{4}-\d{2}-\d{2}$/

The API version to use for this request. Defaults to the version the API key is pinned to.

Example
2026-11-01

OK

Media typeapplication/json

Callback totals for a period (requests made in it).

object
attempts
required
integer
>= -9007199254740991 <= 9007199254740991
avg_return_ms
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
breached_open
required

Still open past their SLA target.

integer
>= -9007199254740991 <= 9007199254740991
by_agent
required
Array<object>
object
agent_id
required
Any of:

A user ID (prefix usr_).

string
/^usr_[0-9A-Za-z]+$/
count
required
integer
>= -9007199254740991 <= 9007199254740991
by_source
required
Array<object>
object
completed
required
integer
>= -9007199254740991 <= 9007199254740991
count
required
integer
>= -9007199254740991 <= 9007199254740991
source
required
string
cancelled
required
integer
>= -9007199254740991 <= 9007199254740991
completed
required
integer
>= -9007199254740991 <= 9007199254740991
expired
required
integer
>= -9007199254740991 <= 9007199254740991
failed
required
integer
>= -9007199254740991 <= 9007199254740991
from
required

An ISO-8601 timestamp in UTC.

string format: date-time
livemode
required

true in live mode, false in test mode.

boolean
object
required
string
Allowed value: callback_stats
open
required
integer
>= -9007199254740991 <= 9007199254740991
sla_rate
required

Within_sla / completed; null with nothing completed.

number | null
to
required

An ISO-8601 timestamp in UTC.

string format: date-time
total
required

Requests in the period.

integer
>= -9007199254740991 <= 9007199254740991
within_sla
required

Completed within their SLA target.

integer
>= -9007199254740991 <= 9007199254740991
Example
{
"attempts": 51,
"avg_return_ms": 1860000,
"breached_open": 1,
"by_agent": [
{
"agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ",
"count": 12
}
],
"by_source": [
{
"completed": 24,
"count": 30,
"source": "queue"
}
],
"cancelled": 1,
"completed": 31,
"expired": 2,
"failed": 3,
"from": "2026-10-27T09:00:00.000Z",
"livemode": true,
"object": "callback_stats",
"open": 5,
"sla_rate": 0.871,
"to": "2026-11-03T09:00:00.000Z",
"total": 42,
"within_sla": 27
}

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "parameter_missing",
"doc_url": "https://docs.morevoice.ai/api/errors#parameter-missing",
"message": "Missing required parameter: to.",
"param": "to",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "invalid_request_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

No valid API key was sent.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "invalid_api_key",
"doc_url": "https://docs.morevoice.ai/api/errors#invalid-api-key",
"message": "Invalid API key.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "authentication_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

The key may not do this (a missing scope, a plan limit, or a compliance block).

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "missing_scope",
"doc_url": "https://docs.morevoice.ai/api/errors#missing-scope",
"message": "This API key lacks the calls:write scope.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "permission_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

Too many requests, or no call capacity right now. Retry after the Retry-After delay.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "rate_limited",
"doc_url": "https://docs.morevoice.ai/api/errors#rate-limited",
"message": "Too many requests. Retry after 1 second.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "rate_limit_error"
}
}
Retry-After
integer

Seconds to wait before retrying.

X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_error
Example
{
"error": {
"code": "internal_error",
"doc_url": "https://docs.morevoice.ai/api/errors#internal-error",
"message": "Something went wrong on MoreVoice's side.",
"request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ",
"type": "api_error"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.