Skip to main content
PATCH
Update a meter

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Path Parameters

id
string
required

Body

application/json
name
string

New meter name. Renaming is allowed even after the meter has processed usage — the name is a label, not part of the definition. Must stay unique within the store. Omit to leave unchanged; null is rejected.

Example:

"Image generations (v2)"

aggregation
enum<string>

New aggregation. Part of the meter definition, so it is only editable while the meter has processed no usage and has no associated purchase. Omit to leave unchanged; null is rejected.

Available options:
count,
sum,
average,
min,
max,
unique
Example:

"sum"

aggregation_property
string | null

New aggregation property. Omit to leave unchanged; send null to clear it (only valid when the resulting aggregation is "count").

Example:

"tokens"

filter
object

New filter. Part of the meter definition (see aggregation). Omit to leave unchanged; null is rejected — to remove a filter, send one with an empty clauses array.

Response

Meter updated

id
string
required

Meter ID

Example:

"mtr_abc123"

store_id
string
required

Store ID

Example:

"sto_abc123"

name
string
required

Meter name

Example:

"Image generations"

event_name
string
required

Usage event name the meter consumes

Example:

"image.generated"

aggregation
enum<string>
required

Aggregation applied to matching events

Available options:
count,
sum,
average,
min,
max,
unique
Example:

"sum"

aggregation_property
string | null
required

Property the aggregation reduces; null for "count"

Example:

"tokens"

filter
object
required

The meter filter; always present (empty clauses = match all)

unit_label
string
required

Display unit

Example:

"images"

status
enum<string>
required

Whether the meter is active or archived

Available options:
active,
archived
Example:

"active"

created_at
string
required

Creation timestamp (ISO 8601)

updated_at
string
required

Last update timestamp (ISO 8601)