Api reference
Get aggregated usage
Get aggregated usage for a specific meter over a time range. Returns the computed value using the meter's aggregation method.
Related endpoints
POST /usage-events— Ingest usage eventsGET /usage-events— Query usage eventsPOST /usage-events/dry-run— Dry-run usage events
Common errors
400 invalid_request— malformed payload or failed validation.401 unauthenticated— missing, malformed, or revoked API key.
Authorization
apiKey x-api-key<token>
Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.
In: header
Path Parameters
meterId*string
Meter ID
Query Parameters
start_time*string
Start of time range (ISO 8601)
end_time*string
End of time range (ISO 8601)
customer_id?string
Filter by customer ID
external_customer_id?string
Filter by external customer ID
subscription_id?string
Filter by subscription ID
Response Body
application/json
application/json
application/json
curl "https://api.revkeen.com/v2/usage-events/aggregate/mtr_abc123?start_time=2026-03-01T00%3A00%3A00Z&end_time=2026-03-31T23%3A59%3A59Z" \ -H "x-api-key: $REVKEEN_API_KEY"{
"object": "usage_aggregate",
"meter_id": "string",
"start_time": "string",
"end_time": "string",
"value": 0,
"event_count": 0
}{
"error": "string"
}{
"error": "string"
}