Get customer usage
Retrieve usage summary for a specific customer within a date range.
This endpoint provides aggregated metrics for a single customer, making it ideal for:
- Customer billing and invoicing
- Per-tenant usage dashboards
- Customer-specific analytics
- Usage-based pricing calculations
Authorization
Bearer AuthorizationBearer <token>
Project API key
In: header
Path Parameters
customerId*string
Customer identifier to get usage for
Length
1 <= lengthQuery Parameters
startDate*string
Start of the date range (ISO 8601 format)
Format
date-timeendDate*string
End of the date range (ISO 8601 format)
Format
date-timeResponse Body
application/json
application/json
application/json
curl -X GET "https://api.limitry.com/v1/customers/string/usage?startDate=2019-08-24T14%3A15%3A22Z&endDate=2019-08-24T14%3A15%3A22Z"{
"customerId": "cust_123",
"totalEvents": 500,
"totalTokens": 200000,
"totalInputTokens": 120000,
"totalOutputTokens": 80000,
"totalCostCents": 500
}{
"error": "Invalid request"
}{
"error": "Invalid or missing API key"
}