---
title: "Create Usage Meter"
method: POST
path: "/api/v1/usage-meters"
tags: ["Usage Meters"]
---

# Create Usage Meter

`POST /api/v1/usage-meters`

## Request body

- object
  - `usageMeter` UsageMeterClientInsertSchema, required
    - `name` string, required
    - `pricingModelId` string, required
    - `slug` string, required
    - `aggregationType` 'sum' | 'count_distinct_properties' — The type of aggregation to perform on the usage meter. Defaults to "sum", which aggregates all the usage event amounts for the billing period. "count_distinct_properties" counts the number of distinct properties in the billing period for a given meter.
  - `price` object
    - `type` 'single_payment' | 'subscription' | 'usage'
    - `unitPrice` number
    - `usageEventsPerUnit` number

## Response `200`

Successful response

- object
  - `usageMeter` UsageMeterClientSelectSchema, required
    - `id` string, required
    - `createdAt` integer, required — Epoch milliseconds.
    - `updatedAt` integer, required — Epoch milliseconds.
    - `livemode` boolean, required
    - `organizationId` string, required
    - `name` string, required — The name of the usage meter
    - `pricingModelId` string, required
    - `slug` string, required — The slug of the usage meter
    - `aggregationType` 'sum' | 'count_distinct_properties', required — The type of aggregation to perform on the usage meter. Defaults to "sum", which aggregates all the usage event amounts for the billing period. "count_distinct_properties" counts the number of distinct properties in the billing period for a given meter.

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `500` — Internal server error

## Changes

- **2025-11-25** `71d495f9b7d8` — 1 info
  - added the new optional request property `price`
- **2025-10-18** `a1eeb4fac4d6` — 6 breaking, 1 warning, 7 info
  - added the new required request property `usageMeter/pricingModelId`
  - the `usageMeter/createdAt` response's property type/format changed from `string`/`date-time` to `integer`/`` for status `200`
  - the `usageMeter/updatedAt` response's property type/format changed from `string`/`date-time` to `integer`/`` for status `200`
  - removed the required property `usageMeter/catalogId` from the response with the `200` status
  - …10 more
- **2025-06-25** `0cf7bce0c17d` — 1 breaking, 3 info
  - added the new required request property `usageMeter/slug`
  - added the required property `usageMeter/livemode` to the response with the `200` status
  - added the required property `usageMeter/organizationId` to the response with the `200` status
  - added the required property `usageMeter/slug` to the response with the `200` status
- **2025-04-28** `00982324965d` — 2 info
  - added the required property `usageMeter/createdByCommit` to the response with the `200` status
  - added the required property `usageMeter/updatedByCommit` to the response with the `200` status
- **2025-04-10** `c33de7567de2` — 1 breaking, 1 warning
  - removed the required property `usageMeter/productId` from the response with the `200` status
  - removed the request property `usageMeter/productId`

[Full history](https://skmtc.dev/flowglad/apis/flowglad-api/changes/api/v1/usage-meters/post.md)

---

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