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

# Archive a meter

> Archive a meter: it leaves the default listing and stops accruing new usage, but is never deleted, so the usage it already recorded stays meaningful. Idempotent — archiving an archived meter returns it unchanged.



## OpenAPI

````yaml post /v1/meters/{id}/archive
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/meters/{id}/archive:
    post:
      tags:
        - Meters
      summary: Archive a meter
      description: >-
        Archive a meter: it leaves the default listing and stops accruing new
        usage, but is never deleted, so the usage it already recorded stays
        meaningful. Idempotent — archiving an archived meter returns it
        unchanged.
      operationId: archiveMeter
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Meter archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeterApiResponseDto'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
        '409':
          description: >-
            The meter is priced on a product you are still selling — remove the
            usage charge (or archive the product) first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMeteringErrorApiResponseDto'
      security:
        - ApiKey: []
components:
  schemas:
    MeterApiResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Meter ID
          example: mtr_abc123
        store_id:
          type: string
          description: Store ID
          example: sto_abc123
        name:
          type: string
          description: Meter name
          example: Image generations
        event_name:
          type: string
          description: Usage event name the meter consumes
          example: image.generated
        aggregation:
          type: string
          description: Aggregation applied to matching events
          enum:
            - count
            - sum
            - average
            - min
            - max
            - unique
          example: sum
        aggregation_property:
          type: string
          description: Property the aggregation reduces; null for "count"
          nullable: true
          example: tokens
        filter:
          description: The meter filter; always present (empty clauses = match all)
          allOf:
            - $ref: '#/components/schemas/MeterFilterApiResponseDto'
        unit_label:
          type: string
          description: Display unit
          example: images
        status:
          type: string
          description: Whether the meter is active or archived
          enum:
            - active
            - archived
          example: active
        created_at:
          type: string
          description: Creation timestamp (ISO 8601)
        updated_at:
          type: string
          description: Last update timestamp (ISO 8601)
      required:
        - id
        - store_id
        - name
        - event_name
        - aggregation
        - aggregation_property
        - filter
        - unit_label
        - status
        - created_at
        - updated_at
    UsageMeteringErrorApiResponseDto:
      type: object
      properties:
        error:
          description: Error details
          allOf:
            - $ref: '#/components/schemas/UsageMeteringErrorDetailApiDto'
      required:
        - error
    MeterFilterApiResponseDto:
      type: object
      properties:
        conjunction:
          type: string
          description: How the clauses combine
          enum:
            - and
            - or
          example: and
        clauses:
          description: Filter clauses; empty means the meter counts every event
          type: array
          items:
            $ref: '#/components/schemas/FilterClauseApiResponseDto'
      required:
        - conjunction
        - clauses
    UsageMeteringErrorDetailApiDto:
      type: object
      properties:
        type:
          type: string
          description: Error category
          enum:
            - invalid_request_error
            - api_error
            - authentication_error
            - rate_limit_error
          example: invalid_request_error
        code:
          type: string
          description: Machine-readable error code
          example: meter_name_taken
          nullable: true
        message:
          type: string
          description: Human-readable error message
          example: A meter named "Image generations" already exists in this store
        param:
          type: string
          description: The parameter related to the error, if applicable
          example: events[3].customer_id
          nullable: true
        details:
          type: object
          description: >-
            Structured, machine-readable context for errors that support an
            action, omitted entirely when there is none. Currently emitted for
            `meter_name_taken` when the colliding name is held by an ARCHIVED
            meter: `archived_holder` is true and `archived_holder_id` is that
            meter, which can be restored via POST /v1/meters/{id}/unarchive.
            Additive — treat unknown keys as ignorable.
          example:
            archived_holder: true
            archived_holder_id: mtr_abc123
        request_id:
          type: string
          description: Unique request identifier for support
          example: req_abc123def456
      required:
        - type
        - code
        - message
        - request_id
    FilterClauseApiResponseDto:
      type: object
      properties:
        property:
          type: string
          description: Event property tested
          example: tier
        operator:
          type: string
          description: Comparison operator
          example: equals
        value:
          description: Value compared against, as stored after parsing
          example: pro
          oneOf:
            - type: string
            - type: number
            - type: boolean
      required:
        - property
        - operator
        - value
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````