# Update Meter

<Note>
**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`.
</Note>

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.

<Warning>
**Archiving stops ingestion immediately**

Once a meter is `INACTIVE`, [Report Usage Event](/reference/meters/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](/reference/meters/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.
</Warning>

Refer to [Meter Error Codes](/reference/meters/meter-error-codes) for the possible error outcomes.

**PATCH** `/subscriptions/meters/{meter_id}`

Base URL: `https://api-sandbox.whitelabel.com/v1`

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.

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Header parameters

- `X-Account-Code` (string, required)
  The `account_id` found in your [WHITELABEL Dashboard](https://dashboard.whitelabel.com/developers) (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 WHITELABEL API.

## Path parameters

- `meter_id` (string, required)
  The unique identifier of the meter.

## Body

Content type: `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)
  - `currency` (string, required)
    Must be `USD`, else `400 INVALID_PARAMETERS`.
  - `value` (number<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.

Example:

```json
{
  "name": "string",
  "description": "string",
  "unit_label": "string",
  "plural_unit_label": "string",
  "default_price": {
    "currency": "string",
    "value": 0
  },
  "status": "ACTIVE"
}
```

## Responses

### 200

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)
- `event_name` (string)
- `aggregation` ("SUM" | "COUNT" | "LAST")
- `unit_label` (string)
- `plural_unit_label` (string)
- `default_price` (object)
  - `currency` (string)
  - `value` (number)
- `metadata` (object[])
  - `key` (string)
  - `value` (string)
- `status` ("ACTIVE" | "INACTIVE")
- `created_at` (string)
  Set by WHITELABEL on creation.
- `updated_at` (string)
  Set by WHITELABEL on every update.

Example:

```json
{
  "id": "string",
  "account_id": "string",
  "name": "string",
  "description": "string",
  "event_name": "string",
  "aggregation": "SUM",
  "unit_label": "string",
  "plural_unit_label": "string",
  "default_price": {
    "currency": "string",
    "value": 0
  },
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "status": "ACTIVE",
  "created_at": "string",
  "updated_at": "string"
}
```

### 400

400

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "string",
  "messages": [
    "string"
  ]
}
```

### 403

403

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "PRODUCT_NOT_ENABLED",
  "messages": [
    "string"
  ]
}
```