Update Meter

Enabled per organization

Usage-based billing must be enabled for your organization before these endpoints accept requests. Contact your WHITELABEL account manager to enable it. Requests from an organization where it is not enabled return 403 PRODUCT_NOT_ENABLED.

Send at least one of name, description, unit_label, plural_unit_label, default_price, status. event_name and aggregation cannot be changed — if you include them they are silently ignored and the response shows the original values.

Archiving stops ingestion immediately

Once a meter is INACTIVE, Report Usage Event rejects its event_name with 400 METER_NOT_FOUND, it can no longer be attached to plans (400 METER_NOT_FOUND), and its existing metered prices are frozen (Update Plan Meter returns 400 PLAN_METER_NOT_FOUND). Metered prices already attached to plans are not removed, the event_name stays reserved (recreating a meter with it is 409), and there is no delete — archiving is the only way to retire a meter You can reactivate it at any time with status: ACTIVE. Make sure no live subscription still relies on the meter before you archive it.

Refer to Meter Error Codes for the possible error outcomes.

PATCH/subscriptions/meters/{meter_id}

Usage-based billing must be enabled for your organization before this endpoint accepts requests (otherwise 403 PRODUCT_NOT_ENABLED). Updates the descriptive fields, default price or status of a meter. Send at least one field. event_name and aggregation are immutable: if you send them they are silently ignored (no error) and the response shows the original values. Set status: INACTIVE to archive a meter — it stops accepting usage events (400 METER_NOT_FOUND), cannot be attached to plans, and its existing metered prices can no longer be edited (400 PLAN_METER_NOT_FOUND); set status: ACTIVE to reactivate it. Archiving does not free the event_name: it stays reserved by the archived meter.

Header Parameters

X-Account-Codestringrequired

The account_id found in your WHITELABEL Dashboard (UUID). Required — omitting it returns 400 BAD_REQUEST (“Invalid x-account-code header.”).

X-Idempotency-Keystringrequired

Unique identifier used in HTTP headers to ensure that a request is processed only once, even if it is retried due to network issues or timeouts. Optional, as on the rest of the WHITELABEL API.

Path Parameters

meter_idstringrequired

The unique identifier of the meter.

Body application/json

namestring

The meter display name (MAX 255; MIN 3).

descriptionstring

What the meter counts and how.

unit_labelstring

Singular unit label.

plural_unit_labelstring

Plural unit label.

default_priceobject
Show default_price properties
currencystringrequired

Must be USD, else 400 INVALID_PARAMETERS.

valuenumber<float>required

Default price per unit beyond the included credits (multiple of 0.0001).

status"ACTIVE" | "INACTIVE"

Set to INACTIVE to archive the meter, ACTIVE to reactivate it. There is no delete. Archiving does not detach the meter from plans it is already attached to, and its event_name remains reserved.

Response

200

idstring

The unique identifier of the meter.

account_idstring

The unique identifier of the account that owns the meter.

namestring
descriptionstring
event_namestring
aggregation"SUM" | "COUNT" | "LAST"
unit_labelstring
plural_unit_labelstring
default_priceobject
Show default_price properties
currencystring
valuenumber
metadataobject[]
Show metadata properties
keystring
valuestring
status"ACTIVE" | "INACTIVE"
created_atstring

Set by WHITELABEL on creation.

updated_atstring

Set by WHITELABEL on every update.

400

codestring
messagesstring[]

403

codestring
messagesstring[]