> ## Documentation Index
> Fetch the complete documentation index at: https://dodopayments-mintlify-external-integration-datafast-autosen.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Meters

> Get a list of all meters.



## OpenAPI

````yaml get /meters
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.61.5
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /meters:
    get:
      tags:
        - Meters
      operationId: list_meters_handler
      parameters:
        - name: page_size
          in: query
          description: Page size default is 10 max is 100
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: page_number
          in: query
          description: Page number default is 0
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: archived
          in: query
          description: List archived meters
          required: false
          schema:
            type: boolean
          style: form
      responses:
        '200':
          description: Meters List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMetersResponse'
        '422':
          description: Invalid Request Object or Parameters
        '500':
          description: Something went wrong :(
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: 'My Bearer Token',
            });

            // Automatically fetches more pages as needed.
            for await (const meter of client.meters.list()) {
              console.log(meter.id);
            }
        - lang: Python
          source: |-
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token="My Bearer Token",
            )
            page = client.meters.list()
            page = page.items[0]
            print(page.id)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dodopayments/dodopayments-go"
              "github.com/dodopayments/dodopayments-go/option"
            )

            func main() {
              client := dodopayments.NewClient(
                option.WithBearerToken("My Bearer Token"),
              )
              page, err := client.Meters.List(context.TODO(), dodopayments.MeterListParams{

              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", page)
            }
        - lang: Java
          source: |-
            package com.dodopayments.api.example;

            import com.dodopayments.api.client.DodoPaymentsClient;
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
            import com.dodopayments.api.models.meters.MeterListPage;
            import com.dodopayments.api.models.meters.MeterListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    MeterListPage page = client.meters().list();
                }
            }
        - lang: Kotlin
          source: |-
            package com.dodopayments.api.example

            import com.dodopayments.api.client.DodoPaymentsClient
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
            import com.dodopayments.api.models.meters.MeterListPage
            import com.dodopayments.api.models.meters.MeterListParams

            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val page: MeterListPage = client.meters().list()
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            page = dodo_payments.meters.list

            puts(page)
components:
  schemas:
    ListMetersResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/MeterResponse'
    MeterResponse:
      type: object
      required:
        - id
        - business_id
        - name
        - event_name
        - aggregation
        - measurement_unit
        - created_at
        - updated_at
      properties:
        aggregation:
          $ref: '#/components/schemas/MeterAggregation'
        business_id:
          type: string
        created_at:
          type: string
          format: date-time
        description:
          type:
            - string
            - 'null'
        event_name:
          type: string
        filter:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MeterFilter'
        id:
          type: string
        measurement_unit:
          type: string
        name:
          type: string
        updated_at:
          type: string
          format: date-time
    MeterAggregation:
      type: object
      title: Meter Aggregation
      required:
        - type
      properties:
        key:
          type:
            - string
            - 'null'
          description: Required when type is not COUNT
        type:
          $ref: '#/components/schemas/AggregationType'
          description: Aggregation type for the meter
    MeterFilter:
      type: object
      title: Meter Filter
      description: >-
        A filter structure that combines multiple conditions with logical
        conjunctions (AND/OR).


        Supports up to 3 levels of nesting to create complex filter expressions.

        Each filter has a conjunction (and/or) and clauses that can be either
        direct conditions or nested filters.
      required:
        - conjunction
        - clauses
      properties:
        clauses:
          $ref: '#/components/schemas/FilterType'
          description: >-
            Filter clauses - can be direct conditions or nested filters (up to 3
            levels deep)
        conjunction:
          $ref: '#/components/schemas/Conjunction'
          description: Logical conjunction to apply between clauses (and/or)
      examples:
        - clauses:
            - key: user_id
              operator: equals
              value: user123
            - key: amount
              operator: greater_than
              value: 100
          conjunction: and
        - clauses:
            - key: plan
              operator: equals
              value: premium
            - key: plan
              operator: equals
              value: enterprise
          conjunction: or
        - clauses:
            - clauses:
                - key: user_type
                  operator: equals
                  value: premium
                - key: user_type
                  operator: equals
                  value: enterprise
              conjunction: or
            - key: active
              operator: equals
              value: true
          conjunction: and
    AggregationType:
      type: string
      enum:
        - count
        - sum
        - max
        - last
    FilterType:
      oneOf:
        - type: array
          title: Direct Filter Conditions
          items:
            type: object
            title: MeterFilterCondition
            description: Filter condition with key, operator, and value
            required:
              - key
              - operator
              - value
            properties:
              key:
                type: string
                description: Filter key to apply
                maxLength: 100
                minLength: 1
              operator:
                $ref: '#/components/schemas/FilterOperator'
              value:
                oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                title: Filter Value
                description: Filter value - can be string, number, or boolean
          description: >-
            Direct filter conditions - array of condition objects with key,
            operator, and value
          maxItems: 10
          minItems: 1
        - type: array
          title: Nested Meter Filters
          items:
            type: object
            title: MeterFilter
            description: Level 1 nested filter - can contain Level 2 filters
            required:
              - conjunction
              - clauses
            properties:
              clauses:
                oneOf:
                  - type: array
                    title: Level 1 Filter Conditions
                    items:
                      type: object
                      title: MeterFilterCondition
                      description: Filter condition with key, operator, and value
                      required:
                        - key
                        - operator
                        - value
                      properties:
                        key:
                          type: string
                          description: Filter key to apply
                          maxLength: 100
                          minLength: 1
                        operator:
                          $ref: '#/components/schemas/FilterOperator'
                        value:
                          oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                          title: Filter Value
                          description: Filter value - can be string, number, or boolean
                    description: Array of filter conditions
                  - type: array
                    title: Level 1 Nested Filters
                    items:
                      type: object
                      title: MeterFilter
                      description: Level 2 nested filter
                      required:
                        - conjunction
                        - clauses
                      properties:
                        clauses:
                          oneOf:
                            - type: array
                              title: Level 2 Filter Conditions
                              items:
                                type: object
                                title: MeterFilterCondition
                                description: Filter condition with key, operator, and value
                                required:
                                  - key
                                  - operator
                                  - value
                                properties:
                                  key:
                                    type: string
                                    description: Filter key to apply
                                    maxLength: 100
                                    minLength: 1
                                  operator:
                                    $ref: '#/components/schemas/FilterOperator'
                                  value:
                                    oneOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                    title: Filter Value
                                    description: >-
                                      Filter value - can be string, number, or
                                      boolean
                              description: Array of filter conditions
                            - type: array
                              title: Level 2 Nested Filters
                              items:
                                type: object
                                title: MeterFilter
                                description: Level 3 nested filter (final nesting level)
                                required:
                                  - conjunction
                                  - clauses
                                properties:
                                  clauses:
                                    type: array
                                    title: Level 3 Filter Conditions
                                    items:
                                      type: object
                                      title: MeterFilterCondition
                                      description: >-
                                        Filter condition with key, operator, and
                                        value
                                      required:
                                        - key
                                        - operator
                                        - value
                                      properties:
                                        key:
                                          type: string
                                          description: Filter key to apply
                                          maxLength: 100
                                          minLength: 1
                                        operator:
                                          $ref: '#/components/schemas/FilterOperator'
                                        value:
                                          oneOf:
                                            - type: string
                                            - type: number
                                            - type: boolean
                                          title: Filter Value
                                          description: >-
                                            Filter value - can be string, number, or
                                            boolean
                                    description: >-
                                      Level 3: Filter conditions only (max depth
                                      reached)
                                    maxItems: 10
                                    minItems: 1
                                  conjunction:
                                    $ref: '#/components/schemas/Conjunction'
                              description: Array of level 3 nested filters (final level)
                          title: Level 2 Clause
                          description: >-
                            Level 2: Can be conditions or nested filters (1 more
                            level allowed)
                        conjunction:
                          $ref: '#/components/schemas/Conjunction'
                    description: Array of level 2 nested filters
                title: Level 1 Clause
                description: >-
                  Level 1: Can be conditions or nested filters (2 more levels
                  allowed)
              conjunction:
                $ref: '#/components/schemas/Conjunction'
          description: Nested filters - supports up to 3 levels deep
          maxItems: 10
          minItems: 1
      title: FilterType
      description: >-
        Filter type - supports up to 3 levels of nesting (Level 1: conditions or
        Level 2 filters)
    Conjunction:
      type: string
      enum:
        - and
        - or
    FilterOperator:
      type: string
      enum:
        - equals
        - not_equals
        - greater_than
        - greater_than_or_equals
        - less_than
        - less_than_or_equals
        - contains
        - does_not_contain
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````