Billing Monthly Usage
GET /api/v1/billing/monthly-usage
Performs the account operation at /api/v1/billing/monthly-usage.
Authenticate with a portal session token.
Responses
200 Monthly usage by calendar month.
application/json object
currencystring requiredCurrency of raw usage_records wallet micros.
Value:"USD"covers_legacy_usageboolean requiredTrue when monthly totals include all usage_records, including rows without receipts.
monthsarray of object requiredEach item:
monthstring requiredmonth_labelstring requiredstatusstring requiredOne of:"in_progress","closed","paid"total_centsinteger requiredtotalstring requiredcall_countinteger requiredtotal_microsinteger requiredExact monthly total in USD micro-units from the usage ledger.
Generated sample
{
"currency": "USD",
"covers_legacy_usage": true,
"months": [
{
"month": "string",
"month_label": "string",
"status": "in_progress",
"total_cents": 0,
"total": "string",
"call_count": 0,
"total_micros": 0
}
]
}401 Missing or invalid bearer token.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
403 The account lacks billing read permission.
application/json object
errorobject requiredmessagestring requiredcodestring requiredValue:"forbidden"
422 The months query parameter is invalid.
application/json object
errorobject requiredcodestring requiredValue:"validation_error"messagestring requiredfieldsobject requiredOther keys: array of string
429 The request was rate limited. API-generated responses are JSON;
Response headers
Retry-Afterstring headerSeconds to wait before retrying, when provided.
X-RateLimit-Scopestring headerIdentifies the scope of the request limit, when provided.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string