> ## 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.

# List customer licenses

> Retrieve a paginated list of license keys for a specific customer.



## OpenAPI

````yaml get /v1/customers/{id}/licenses
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/customers/{id}/licenses:
    get:
      tags:
        - Customers
      summary: List customer licenses
      description: Retrieve a paginated list of license keys for a specific customer.
      operationId: listCustomerLicenses
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier of the customer
          schema:
            type: string
        - name: page_number
          required: false
          in: query
          description: The page number for pagination.
          schema:
            default: 1
            example: 1
            type: number
        - name: page_size
          required: false
          in: query
          description: The number of items per page.
          schema:
            default: 10
            example: 10
            type: number
      responses:
        '200':
          description: Successfully retrieved customer licenses
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseListEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    LicenseListEntity:
      type: object
      properties:
        items:
          description: List of license items
          items:
            $ref: '#/components/schemas/LicenseEntity'
          type: array
        pagination:
          description: Pagination details for the list
          allOf:
            - $ref: '#/components/schemas/PaginationEntity'
      required:
        - items
        - pagination
    LicenseEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            A string representing the object's type. Objects of the same type
            share the same value.
        product_id:
          type: string
          description: The ID of the product this license belongs to.
          example: prod_abc123
        status:
          $ref: '#/components/schemas/LicenseStatus'
          example: active
        key:
          type: string
          description: The license key.
          example: ABC123-XYZ456-XYZ456-XYZ456
        activation:
          type: number
          description: The number of instances that this license key was activated.
          example: 5
        activation_limit:
          type: number
          description: The activation limit. Null if activations are unlimited.
          example: 1
          nullable: true
        expires_at:
          type: string
          description: >-
            The date the license key expires. Null if it does not have an
            expiration date.
          example: '2023-09-13T00:00:00Z'
          format: date-time
          nullable: true
        created_at:
          format: date-time
          type: string
          description: The creation date of the license key.
          example: '2023-09-13T00:00:00Z'
        instance:
          description: Associated license instances.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/LicenseInstanceEntity'
      required:
        - id
        - mode
        - object
        - product_id
        - status
        - key
        - activation
        - created_at
    PaginationEntity:
      type: object
      properties:
        total_records:
          type: number
          description: Total number of records in the list
          example: 0
        total_pages:
          type: number
          description: Total number of pages available
          example: 0
        current_page:
          type: number
          description: The current page number
          example: 1
        next_page:
          type: number
          description: The next page number, or null if there is no next page
          example: 2
          nullable: true
        prev_page:
          type: number
          description: The previous page number, or null if there is no previous page
          example: null
          nullable: true
      required:
        - total_records
        - total_pages
        - current_page
        - next_page
        - prev_page
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
    LicenseStatus:
      type: string
      description: The current status of the license key.
      enum:
        - inactive
        - active
        - expired
        - disabled
    LicenseInstanceEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            A string representing the object’s type. Objects of the same type
            share the same value.
          example: license-instance
        name:
          type: string
          description: The name of the license instance.
          example: My Customer License Instance
        status:
          type: string
          description: The status of the license instance.
          enum:
            - active
            - deactivated
          example: active
        created_at:
          format: date-time
          type: string
          description: The creation date of the license instance.
          example: '2023-09-13T00:00:00Z'
      required:
        - id
        - mode
        - object
        - name
        - status
        - created_at
  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.

````