> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Meter

> Updates a meter's descriptive fields, default price or status; archives a meter with status INACTIVE.

<Note>
  **Enabled per organization**

  Usage-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`.
</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.


## OpenAPI

````yaml openapi/meters/update-meter.json PATCH /subscriptions/meters/{meter_id}
openapi: 3.1.0
info:
  title: meters
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
  - url: https://api.eu.y.uno/v1
security:
  - sec0: []
    sec1: []
paths:
  /subscriptions/meters/{meter_id}:
    patch:
      summary: Update Meter
      description: >-
        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.
      operationId: update-meter
      parameters:
        - in: header
          name: X-Account-Code
          required: true
          schema:
            type: string
          description: >-
            The `account_id` found in your [Yuno
            Dashboard](https://dashboard.y.uno/developers) (UUID). Required —
            omitting it returns `400 BAD_REQUEST` ("Invalid x-account-code
            header.").
        - name: meter_id
          in: path
          required: true
          description: The unique identifier of the meter.
          schema:
            type: string
        - in: header
          name: X-Idempotency-Key
          required: true
          schema:
            type: string
          description: >-
            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.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The meter display name (MAX 255; MIN 3).
                description:
                  type: string
                  description: What the meter counts and how.
                unit_label:
                  type: string
                  description: Singular unit label.
                plural_unit_label:
                  type: string
                  description: Plural unit label.
                default_price:
                  type: object
                  required:
                    - currency
                    - value
                  properties:
                    currency:
                      type: string
                      description: Must be `USD`, else `400 INVALID_PARAMETERS`.
                    value:
                      type: number
                      format: float
                      description: >-
                        Default price per unit beyond the included credits
                        (multiple of 0.0001).
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
                  description: >-
                    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.
            examples:
              Archive:
                summary: Archive the meter
                value:
                  status: INACTIVE
              Rename:
                summary: Rename and change the default price
                value:
                  name: LLM Tokens
                  default_price:
                    currency: USD
                    value: 0.0025
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 55555555-5555-5555-5555-555555555555
                    account_id: 00000000-0000-4000-8000-000000000002
                    name: AI tokens
                    description: >-
                      LLM tokens consumed by model responses, reported once per
                      response
                    event_name: ai_tokens
                    aggregation: SUM
                    unit_label: token
                    plural_unit_label: tokens
                    default_price:
                      currency: USD
                      value: 0.002
                    metadata:
                      - key: team
                        value: platform
                    status: INACTIVE
                    created_at: '2026-08-18T09:00:04.000000Z'
                    updated_at: '2026-08-18T12:15:00.000000Z'
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the meter.
                  account_id:
                    type: string
                    description: The unique identifier of the account that owns the meter.
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  event_name:
                    type: string
                  aggregation:
                    type: string
                    enum:
                      - SUM
                      - COUNT
                      - LAST
                  unit_label:
                    type: string
                    nullable: true
                  plural_unit_label:
                    type: string
                    nullable: true
                  default_price:
                    type: object
                    properties:
                      currency:
                        type: string
                      value:
                        type: number
                  metadata:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          type: string
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - INACTIVE
                    example: ACTIVE
                  created_at:
                    type: string
                    description: Set by Yuno on creation.
                  updated_at:
                    type: string
                    description: Set by Yuno on every update.
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Empty body:
                  summary: Empty body
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - At least one field must be provided to update the meter
                Non-USD default_price:
                  summary: Non-USD default_price
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - The default_price currency must be USD
                Result:
                  value:
                    code: METER_NOT_FOUND
                    messages:
                      - >-
                        The meter does not exist or is not linked to this
                        account.
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Product not enabled:
                  summary: Product not enabled
                  value:
                    code: PRODUCT_NOT_ENABLED
                    messages:
                      - Usage-based billing is not enabled for this organization
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: PRODUCT_NOT_ENABLED
                  messages:
                    type: array
                    items:
                      type: string
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````