Skip to main content
PATCH
Enabled per organizationUsage-based billing must be enabled for your organization before these endpoints accept requests. Contact your Yuno 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 immediatelyOnce 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.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Headers

X-Account-Code
string
required

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

X-Idempotency-Key
string
required

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 Yuno API.

Path Parameters

meter_id
string
required

The unique identifier of the meter.

Body

application/json
name
string

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

description
string

What the meter counts and how.

unit_label
string

Singular unit label.

plural_unit_label
string

Plural unit label.

default_price
object
status
enum<string>

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.

Available options:
ACTIVE,
INACTIVE

Response

200

id
string

The unique identifier of the meter.

account_id
string

The unique identifier of the account that owns the meter.

name
string
description
string | null
event_name
string
aggregation
enum<string>
Available options:
SUM,
COUNT,
LAST
unit_label
string | null
plural_unit_label
string | null
default_price
object
metadata
object[]
status
enum<string>
Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

created_at
string

Set by Yuno on creation.

updated_at
string

Set by Yuno on every update.