---
title: "Update Usage Meter"
method: PUT
path: "/api/v1/usage-meters/{id}"
tags: ["Usage Meters"]
---

# Update Usage Meter

`PUT /api/v1/usage-meters/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `usageMeter` UsageMeterClientUpdateSchema, required
    - `id` string, required
    - `name` string
    - `slug` string
    - `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.

## 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
- `404` — Not found
- `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)
