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

# List licenses



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json get /api/v1/licenses
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Budgets
    description: >-
      Beta: may change before general availability. Spending limits on a
      customer's usage, or one subscription's, per currency, with alerts at
      percentages of the amount.
    x-beta: true
  - name: Checkout Sessions
  - name: Checks
    description: >-
      Beta: may change before general availability. Whether a customer may
      consume more of a feature right now.
    x-beta: true
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Credit units
    description: >-
      Custom denominations, such as "credits", that usage can be priced in and
      credit granted or sold in, instead of money.
  - name: Credits
    description: >-
      Prepaid credit: a customer's wallets, credit grants, ledger and top-ups.
      Promotional credit applies before tax like a discount; paid credit applies
      after tax like a payment.
  - name: Custom Properties
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Licenses
    description: >-
      Licenses for your customers' self-hosted installations: signed tokens
      carrying their plan's entitlements, activated and refreshed by the
      installation over the public licensing endpoints.
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
  - name: Usage costs
    description: >-
      Beta: may change before general availability. A customer's or a
      subscription's usage events and usage over time, with what they cost.
    x-beta: true
  - name: Webhook Endpoints
    description: Manage outbound webhook endpoints and inspect their deliveries
paths:
  /api/v1/licenses:
    get:
      tags:
        - Licenses
      summary: List licenses
      operationId: list_licenses
      parameters:
        - name: customer_id
          in: query
          description: Filter by customer ID or alias
          required: false
          schema:
            type: string
        - name: subscription_id
          in: query
          required: false
          schema:
            type: string
        - name: include_revoked
          in: query
          description: 'Include revoked licenses. Default: false.'
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Licenses, newest first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseListResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    LicenseListResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/License'
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    License:
      type: object
      required:
        - id
        - customer_id
        - customer_name
        - status
        - auto_issued
        - validity_days
        - has_activation_code
        - created_at
        - revoked_immediately
        - offline
      properties:
        auto_issued:
          type: boolean
          description: >-
            Issued automatically for a subscription to a plan that issues
            licenses.
        created_at:
          type: string
          format: date-time
        customer_id:
          $ref: '#/components/schemas/CustomerId'
        customer_name:
          type: string
        has_activation_code:
          type: boolean
          description: >-
            Whether the activation code can still be retrieved: only until
            activation or revocation.
        id:
          $ref: '#/components/schemas/LicenseId'
        instance_id:
          type:
            - string
            - 'null'
          description: The installation the license is bound to, once activated.
        last_refreshed_at:
          type:
            - string
            - 'null'
          format: date-time
        offline:
          type: boolean
          description: 'Issued as a signed offline license: never activated nor refreshed.'
        plan_name:
          type:
            - string
            - 'null'
        revoked_at:
          type:
            - string
            - 'null'
          format: date-time
        revoked_immediately:
          type: boolean
          description: >-
            Revoked to stop at once: the installation drops its license on its
            next refresh instead

            of keeping it until it expires.
        status:
          $ref: '#/components/schemas/LicenseStatus'
        subscription_id:
          oneOf:
            - $ref: '#/components/schemas/SubscriptionId'
            - type: 'null'
        validity_days:
          type: integer
          format: int32
          description: >-
            Lifetime of each license token the installation receives on refresh;
            for an offline

            license, the lifetime it was issued with.
          minimum: 0
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOKEN_EXPIRED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
    CustomerId:
      type: string
      format: MeteroidId
      examples:
        - cus_7n42DGM5Tflk9n8mt7Fhc7
    LicenseId:
      type: string
      format: MeteroidId
      examples:
        - lic_7n42DGM5Tflk9n8mt7Fhc7
    LicenseStatus:
      type: string
      title: LicenseStatus
      enum:
        - PENDING
        - ACTIVE
        - REVOKED
    SubscriptionId:
      type: string
      format: MeteroidId
      examples:
        - sub_7n42DGM5Tflk9n8mt7Fhc7
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.