Skip to main content
PATCH
Change Meter

Authorizations

Authorization
string
header
required

Authentication: You can generate a Personal Access Token from your settings.

Path Parameters

id
string<uuid4>
required

Identifier of the meter.

Body

application/json
metadata
Metadata · object

Metadata map for information your integration needs to retain.

The key must be a string with a maximum length of 40 characters. The value must be either:

  • A string with a maximum length of 500 characters
  • An integer
  • A floating-point number
  • A boolean

You can store up to 50 key-value pairs.

name
string | null

Name assigned to the meter. Will be shown on customer's invoices and usage.

Minimum string length: 3
unit
enum<string> | null

Unit: Unit of the meter.

Available options:
scalar,
token,
custom
custom_label
string | null

Custom Label: Label for the custom unit. Required when unit is 'custom'.

custom_multiplier
integer | null

Custom Multiplier: Multiplier to convert from base unit to display scale. Required when unit is 'custom'.

Required range: x > 0
filter
Filter · object | null

Filter: Filter to apply on events that'll be used to calculate the meter.

aggregation
CountAggregation · object

Aggregation: Aggregation to apply on the filtered events to calculate the meter.

is_archived
boolean | null

Indicates whether the meter is archived. Archived meters are no longer used for billing.

Response

Response: Meter updated.

metadata
object
required
created_at
string<date-time>
required

The time Ruba created this record.

modified_at
string<date-time> | null
required

The time this record last changed.

id
string<uuid4>
required

The stable identifier for this record.

name
string
required

Name assigned to the meter. Will be shown on customer's invoices and usage.

unit
enum<string>
required

Unit: Unit of the meter.

Available options:
scalar,
token,
custom
filter
Filter · object
required

Filter: Filter to apply on events that'll be used to calculate the meter.

aggregation
CountAggregation · object
required

Aggregation: Aggregation to apply on the filtered events to calculate the meter.

organization_id
string<uuid4>
required

Unique identifier for the organization owning the meter.

custom_label
string | null

Custom Label: Label for the custom unit.

custom_multiplier
integer | null

Custom Multiplier: Multiplier to convert from base unit to display scale.

archived_at
string<date-time> | null

Indicates whether the meter is archived and the time it was archived.