Get usage history
GET
/v1/billing/usage-history
const url = 'https://api.hookbridge.io/v1/billing/usage-history?limit=12&offset=0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.hookbridge.io/v1/billing/usage-history?limit=12&offset=0' \ --header 'Authorization: Bearer <token>'Retrieve historical monthly usage metrics for the authenticated tenant. Periods are calendar-month aligned (UTC).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
Number of months to return
offset
integer
Number of months to skip
Responses
Section titled “Responses”Usage history retrieved successfully
Media typeapplication/json
object
data
Array<object>
object
period_start
string format: date
period_end
string format: date
message_count
integer
overage_count
integer
plan_limit
integer
meta
object
request_id
Unique identifier for this request (useful for support)
string
total
integer
limit
integer
offset
integer
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
Media typeapplication/json
object
error
object
code
Machine-readable error code
string
message
Human-readable error message
string
meta
object
request_id
Unique identifier for this request (useful for support)
string
Examples
Endpoint not found
{ "error": { "code": "ENDPOINT_NOT_FOUND", "message": "endpoint not found" }, "meta": { "request_id": "req_xyz123" }}Invalid endpoint ID format
{ "error": { "code": "INVALID_REQUEST", "message": "endpoint_id must be in format ep_xxx" }, "meta": { "request_id": "req_xyz123" }}Invalid payload
{ "error": { "code": "INVALID_REQUEST", "message": "payload must be valid JSON" }, "meta": { "request_id": "req_xyz123" }}Invalid headers
{ "error": { "code": "INVALID_HEADERS", "message": "header 'Host' is forbidden and cannot be overridden" }, "meta": { "request_id": "req_xyz123" }}Unauthorized - Invalid or missing API key
Media typeapplication/json
object
error
object
code
Machine-readable error code
string
message
Human-readable error message
string
meta
object
request_id
Unique identifier for this request (useful for support)
string
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.