Retrieve usage
import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const usageReport = await mv.usage.retrieve({ from: "2026-10-01", to: "2026-10-31",});console.log(usageReport);from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
usage_report = client.usage.retrieve(from_="2026-10-01", to="2026-10-31")print(usage_report)curl -G https://api.morevoice.ai/v1/usage \ -H "Authorization: Bearer $MOREVOICE_API_KEY" \ --data-urlencode 'from=2026-10-01' \ --data-urlencode 'to=2026-10-31'Usage per day or month and kind, with its price from your price book (minor units of your billing currency). totals sums the range per kind: for a calendar month they are the billing page’s figures. Test keys get their test-mode usage, which is never billed (amounts are null).
Try it in the API playground with a test-mode key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The first day (YYYY-MM-DD, the organisation’s time zone).
The last day, inclusive. Per kind: up to 400 days; per assistant or campaign (and in test mode): up to 92 days.
One row per day (default) or per calendar month.
kind (default): one row per period and usage kind; assistant / campaign: also split by the assistant or campaign the usage belongs to.
Only this usage kind.
Header Parameters
Section titled “Header Parameters”The API version to use for this request. Defaults to the version the API key is pinned to.
Example
2026-11-01Responses
Section titled “Responses”OK
Metered usage and its price for a date range.
object
object
Metered events behind the row.
The usage kind, e.g. ai_minute, pbx_minute, carrier_minute, seat_day, qa_scored_call, sms, api_request.
YYYY-MM-DD (granularity day) or YYYY-MM (month), in the organisation’s time zone.
In units (minutes are decimals).
Minute, seat_day, call, gb_day, message, number_month, number, request or usd.
true in live mode, false in test mode.
The organisation’s time zone: the days and months are its local calendar.
The whole range per kind: for a calendar month, the figures of the billing page’s usage summary.
Example
{ "data": [ { "amount": { "amount": 41250, "currency": "ILS" }, "events": 268, "kind": "ai_minute", "period": "2026-11-03", "quantity": 412.5, "unit": "minute" } ], "from": "2026-11-01", "granularity": "day", "group_by": "kind", "livemode": true, "object": "usage_report", "timezone": "Asia/Jerusalem", "to": "2026-11-30", "total": { "amount": 41250, "currency": "ILS" }, "totals": [ { "amount": { "amount": 41250, "currency": "ILS" }, "kind": "ai_minute", "quantity": 412.5, "unit": "minute" } ]}The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No valid API key was sent.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”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).
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”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.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”Seconds to wait before retrying.
The request’s ID (req_…). Quote it when you contact support.
Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the 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" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.