Create 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.
event_name and aggregation are immutable
They define what your systems send and how it counts, so they can’t change after creation (a PATCH that includes them is silently ignored). To change either, create a new meter with a new event_name and archive the old one with Update Meter (status: INACTIVE). event_name is unique per account across active and archived meters, so pick a name you won’t need to reuse. status sent on creation is ignored — a new meter is always ACTIVE.
See The Meter Object for every field, and the Usage-Based Billing guide for the end-to-end flow. Refer to Meter Error Codes for the possible error outcomes.
/subscriptions/metersUsage-based billing must be enabled for your organization before this endpoint accepts requests (otherwise 403 PRODUCT_NOT_ENABLED). Creates a meter: a named, countable action your product performs (tokens, API requests, gigabytes held). The meter defines the event_name your systems send and how the reported values aggregate per billing cycle. Attach it to a plan as a metered price to bill usage.
Header Parameters
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.
Body application/json
The unique identifier of the account the meter belongs to (UUID, 36 chars).
The meter display name (MAX 255; MIN 3). Leading and trailing spaces are trimmed.
What the meter counts and how. Optional but recommended — it is how your team and WHITELABEL support understand the meter.
The key your systems send on every usage event to reference this meter (MAX 100; lowercase letters, digits, _ and . only — ^[a-z0-9_.]+$). Must be unique across all meters of the account, ACTIVE or INACTIVE, else 409 METER_EVENT_NAME_CONFLICT. Immutable after creation.
How reported events roll up into the cycle quantity. SUM adds every event value (tokens, minutes). COUNT counts events, ignoring value (API requests). LAST keeps the most recent value (a gauge such as gigabytes held). Immutable after creation.
Singular unit label used when the usage is displayed. Example: token.
Plural unit label used when the usage is displayed. Example: tokens.
Optional key-value pairs attached to the meter (MAX 48 entries; keys must be unique per meter).
Ignored on creation — a new meter is always ACTIVE. Use Update Meter to archive it.
Response
201
The unique identifier of the meter.
The unique identifier of the account that owns the meter.
Set by WHITELABEL on creation.
Set by WHITELABEL on every update.
400
403
409