---
title: "Get usage by meter"
method: POST
path: "/events/usage/meter"
tags: ["Events"]
---

# Get usage by meter

`POST /events/usage/meter`

Use when showing usage for a specific meter (e.g. dashboard or overage check). Supports time range, filters, and grouping by customer or subscription.

## Request body

- GetUsageByMeterRequest
  - `billing_anchor` string, date-time — BillingAnchor enables custom monthly billing periods for meter usage aggregation. Usage guidelines: - Only effective when WindowSize = "MONTH" - For other window sizes (DAY, HOUR, WEEK), this field is ignored - When nil, uses standard calendar months (1st to 1st) - When provided, creates custom monthly periods (e.g., 5th to 5th) Common use cases: - Subscription billing periods that don't align with calendar months - Customer-specific billing cycles (e.g., signed up on 15th) - Multi-tenant systems with different billing anchor dates Example: If BillingAnchor = "2024-03-05T14:30:45Z" and WindowSize = "MONTH": - March period: 2024-03-05 14:30:45 to 2024-04-05 14:30:45 - April period: 2024-04-05 14:30:45 to 2024-05-05 14:30:45
  - `bucket_size` 'MINUTE' | '15MIN' | '30MIN' | 'HOUR' | '3HOUR' | '6HOUR' | '12HOUR' | 'DAY' | 'WEEK' | 'MONTH'
  - `customer_id` string
  - `end_time` string, date-time
  - `external_customer_id` string
  - `filters` object
  - `meter_id` string, required
  - `start_time` string, date-time
  - `timezone` string
  - `window_size` 'MINUTE' | '15MIN' | '30MIN' | 'HOUR' | '3HOUR' | '6HOUR' | '12HOUR' | 'DAY' | 'WEEK' | 'MONTH'

## Response `200`

OK

- GetUsageResponse
  - `event_name` string
  - `results` UsageResult[]
    - `value` number
    - `window_size` string
  - `type` 'COUNT' | 'SUM' | 'AVG' | 'COUNT_UNIQUE' | 'LATEST' | 'SUM_WITH_MULTIPLIER' | 'MAX' | 'WEIGHTED_SUM'
  - `value` number

## Other responses

- `400` — Invalid request
- `404` — Resource not found
- `500` — Server error

## Changes

- **2026-07-15** `f8ecf435d25d` — 3 warning
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `404`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
- **2026-07-09** `646d6658479b` — 3 breaking
  - the `billing_anchor` request property format changed from no format to `date-time`
  - the `end_time` request property format changed from no format to `date-time`
  - the `start_time` request property format changed from no format to `date-time`
- **2026-07-09** `7d57386313c7` — 4 breaking, 20 info
  - request property `bucket_size` was restricted to a list of enum values
  - request property `window_size` was restricted to a list of enum values
  - the `bucket_size` request property type changed from no type to `string`
  - the `window_size` request property type changed from no type to `string`
  - …20 more
- **2026-07-09** `4b1a811c4179` — 22 breaking, 3 info
  - removed the enum value `12HOUR` of the request property `bucket_size`
  - removed the enum value `12HOUR` of the request property `window_size`
  - removed the enum value `15MIN` of the request property `bucket_size`
  - removed the enum value `15MIN` of the request property `window_size`
  - …21 more
- **2026-06-29** `7857ddc6e44d` — 1 info
  - added the new optional request property `timezone`

[Full history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/events/usage/meter/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/e1d4e27b5677/schema)
