Skip to main content
Retrieves historical usage data for a customer’s metered feature.
Usage history can now be retrieved regardless of whether the customer currently has an active subscription. Pass includeInactiveSubscriptions: true when using the GraphQL API or GraphQL-based SDKs. The REST API supports this automatically — no extra parameter needed.

Query

Parameters

UsageHistoryV2Input
required
Input parameters for usage history query

Return Type

Returns a UsageHistoryV2 object with:

UsagePeriod Fields

UsageMarker Fields

Common Use Cases

Build usage trend charts showing consumption over time, including for customers who no longer have an active subscription.
Generate usage reports for customer billing visibility.
Analyze usage patterns to predict future needs.
Use the markers array to overlay subscription usage reset boundaries onto raw usage charts, making it easy to see exactly how much was consumed within each billing period.

Example: Build Usage Chart