Skip to content

Get usage history

GET
/v1/billing/usage-history

Retrieve historical monthly usage metrics for the authenticated tenant. Periods are calendar-month aligned (UTC).

limit
integer
default: 12 >= 1 <= 24

Number of months to return

offset
integer
0

Number of months to skip

Usage history retrieved successfully

object
data
Array<object>
object
period_start
string format: date
Example
2026-02-01
period_end
string format: date
Example
2026-02-28
message_count
integer
Example
6102
overage_count
integer
Example
1102
plan_limit
integer
nullable
Example
5000
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
total
integer
Example
6
limit
integer
Example
12
offset
integer
0
has_more
boolean
Example
{
"data": [
{
"period_start": "2026-02-01",
"period_end": "2026-02-28",
"message_count": 6102,
"overage_count": 1102,
"plan_limit": 5000
}
],
"meta": {
"request_id": "req_xyz123",
"total": 6,
"limit": 12,
"offset": 0,
"has_more": false
}
}

Invalid request

object
error
object
code

Machine-readable error code

string
Example
INVALID_REQUEST
message

Human-readable error message

string
Example
endpoint must be a valid HTTPS URL
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Examples

Endpoint not found

{
"error": {
"code": "ENDPOINT_NOT_FOUND",
"message": "endpoint not found"
},
"meta": {
"request_id": "req_xyz123"
}
}

Unauthorized - Invalid or missing API key

object
error
object
code

Machine-readable error code

string
Example
INVALID_REQUEST
message

Human-readable error message

string
Example
endpoint must be a valid HTTPS URL
meta
object
request_id

Unique identifier for this request (useful for support)

string
Example
req_xyz123
Example
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
},
"meta": {
"request_id": "req_xyz123"
}
}
Personalize Examples

Enter your credentials to populate code examples throughout the docs.