---
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
    - `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

---

[API](https://skmtc.net/flowglad/apis/flowglad-api-2.md) · [All operations](https://skmtc.net/flowglad/apis/flowglad-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flowglad/flowglad-api-2/versions/c838c92c3606/schema)
