Skip to main content
PATCH
Update a meter

Authorizations

Authorization
string
header
required

Your account's secret key: Authorization: Bearer sk_test_… or sk_live_…. Server-side only.

Path Parameters

productID
string
required

Product ID.

Pattern: ^prod_[0-9A-Za-z]{22}$
Example:

"prod_1d4YogBuw00jAySh5mbUpk"

meterID
string<uuid>
required

Meter ID.

Body

application/json

Omitted fields stay as they are. name cannot be changed.

displayName
string
unit
enum<string>
Available options:
token,
request,
unit
aggregation
enum<string>
Available options:
sum,
count

Response

The updated meter.

A meter: defines how usage events add up to a billable quantity.

id
string<uuid>
required
productId
string
required
Pattern: ^prod_[0-9A-Za-z]{22}$
Example:

"prod_1d4YogBuw00jAySh5mbUpk"

name
string
required

The key you send in track(). Cannot change after creation.

displayName
string
required

Name shown on invoices and in the dashboard.

unit
enum<string>
required

token, request or unit.

Available options:
token,
request,
unit
aggregation
enum<string>
required

How events aggregate: sum, count, unique_count, max or last.

Available options:
sum,
count,
unique_count,
max,
last
status
string
required
valueProperty
string | null

Event field carrying the numeric value. Unused with count.