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

# List licenses (paginated)

> Returns the operational licenses for your organization, paginated.

The response contains the licenses tied to your organization, wrapped in
a paginated envelope: the rows travel under `licenses` and the paging
metadata under `pagination`.

`page`, `limit` and `sort` are optional. **Calling this endpoint with no
query params returns only the first 10 licenses** — the response is a
normal `200 OK`, so if your organization has more than 10 licenses and
you do not paginate, the extra ones are simply missing. Send an explicit
`limit`, or page through the results while `pagination.hasNextPage` is
`true`.

Requesting a page beyond the last one is not an error: it answers `200`
with an empty `licenses` array and the real `totalCount`.


## OpenAPI

````yaml /openapi.yaml get /licenses/all
openapi: 3.0.3
info:
  title: Anzi Backend API
  version: 1.0.0
  description: |
    API reference for Anzi. This spec is scoped to the Organizations module.
servers:
  - url: https://sandbox-api.anzi.finance/v1
    description: Sanbox
  - url: https://api.anzi.finance/v1
    description: Production
security: []
tags:
  - name: Licenses
    description: Operational licenses
  - name: Users
    description: Manage users and API keys
  - name: Guarantees
    description: Create guarantees and update their credit status
  - name: Claims
    description: Manage claims
paths:
  /licenses/all:
    get:
      tags:
        - Licenses
      summary: List licenses (paginated)
      description: Returns the operational licenses for your organization, paginated.
      parameters:
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number (1-based). Defaults to 1.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: >-
            Page size, up to 100. Defaults to 10 — send it explicitly if you
            expect more.
        - in: query
          name: sort
          required: false
          schema:
            type: string
            enum:
              - asc
              - ascending
              - desc
              - descending
            default: asc
          description: Sort direction applied to the license `uid`. Defaults to ascending.
      responses:
        '200':
          description: Paginated list of licenses
          content:
            application/json:
              schema:
                type: object
                properties:
                  licenses:
                    type: array
                    items:
                      $ref: '#/components/schemas/License'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
              examples:
                example:
                  value:
                    licenses:
                      - uid: LIC-0001-XYZ
                        tokenId: '123456'
                        active: true
                        administrationFee: 0
                        billCycle: P1M
                        coveragePercentage: 50
                        daysForGuaranteesDueDate: 365
                        historicPremiums: 120000
                        installmentStrategy: INSTALLMENT_COUNT
                        installmentsEnabled: true
                        isPremiumDefinedByClient: true
                        isVariablePremium: true
                        lastPortfolioUpdateDate: '2025-09-01T12:00:00.000Z'
                        lastRevision: '2025-08-15T00:00:00.000Z'
                        maximumCoverage: 50000
                        maximumLoanAmount: 15000
                        maximumLoanTerm: P18M
                        maximumPremium: 5
                        minimumDaysToDeclareDefault: 190
                        minimumLoanAmount: 1000
                        minimumLoanTerm: P1M
                        minimumPremium: 2.5
                        name: Operative License A
                        portfolioCoverageCap: 2000000
                        portfolioCoverageUsed: 750000
                        premium: 3.5
                        taxRate: 0.19
                        timezone: America/Bogota
                        type: 0
                        validityPeriod: P6M
                      - uid: LIC-0002-XYZ
                        tokenId: '123457'
                        active: true
                        name: Operative License B
                        billCycle: P1M
                        coveragePercentage: 60
                        timezone: America/Bogota
                        type: 0
                    pagination:
                      startCursor: LIC-0001-XYZ
                      endCursor: LIC-0002-XYZ
                      hasNextPage: true
                      hasPreviousPage: false
                      totalCount: 12
        '400':
          description: >-
            Validation error (e.g. `page` below 1, non-numeric `limit`, unknown
            `sort`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized (invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    code: AUTH_2
                    message: Unauthorized
        '404':
          description: No licenses are associated with the API key's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                noLicenses:
                  value:
                    code: LI_00
                    message: License Not Found
      security:
        - apiKeyAuth: []
components:
  schemas:
    License:
      type: object
      properties:
        uid:
          type: string
          description: Unique identifier of the license.
        tokenId:
          type: string
          description: Identifier for NFT associated to the license.
        active:
          type: boolean
          description: Indicates if the license is active or not.
        administrationFee:
          type: number
          description: >-
            Amount of the administration fee to be paid over the reserve fund,
            only valid for FIRST LOSS licenses (license.type = FIRST_LOSS).
        billCycle:
          type: string
          description: ISO 8601 duration for billing cycle (e.g., P1M).
        coveragePercentage:
          type: number
          description: >-
            For Surety licenses only (license.type = SURETY). This represents
            the maximum percentage that Anzi will cover for each loan.
        daysForGuaranteesDueDate:
          type: number
          description: >-
            The number of days after the surety.loanPaymentDueDate, during which
            the surety will still be valid.
        historicPremiums:
          type: number
          description: Accumulated premium history amount.
        installmentStrategy:
          type: string
          nullable: true
          enum:
            - INSTALLMENT_COUNT
            - INSTALLMENT_AMOUNT
          description: >
            Installments strategy used when installments are enabled.

            - INSTALLMENT_COUNT: Strategy based on the number of installments
            (cuotas).

            - INSTALLMENT_AMOUNT: Strategy based on the installment amount
            (valor de la cuota).
        installmentsEnabled:
          type: boolean
          nullable: true
          description: >-
            Indicates whether the license supports loan payments in
            installments.
        isPremiumDefinedByClient:
          type: boolean
          description: >-
            Indicates if the premium must be defined by the client when a
            guarantee is being created.
        isVariablePremium:
          type: boolean
          description: Indicates if the premium is variable.
        lastPortfolioUpdateDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp of the last update sent to Anzi regarding the status of
            the portfolio loans.
        lastRevision:
          type: string
          format: date-time
          description: >-
            ISO 8601 Date. Date of the last review of license configurations by
            the Anzi team.
        maximumCoverage:
          type: number
          description: >-
            For Surety licenses only (license.type = SURETY). Maximum loan
            amount that can be covered by an Anzi guarantee.
        maximumLoanAmount:
          type: number
          description: Maximum loan amount to be covered by Anzi.
        maximumLoanTerm:
          type: string
          description: Maximum duration of a loan in ISO 8601 duration format.
        maximumPremium:
          type: number
          description: >-
            Maximum premium amount to be paid for coverage concept, only valid
            if license.isVariablePremium is true.
        minimumDaysToDeclareDefault:
          type: number
          description: >-
            The number of days that must elapse since the last payment to
            declare a default.
        minimumLoanAmount:
          type: number
          description: Minimum loan amount to be covered by Anzi.
        minimumLoanTerm:
          type: string
          description: Minimum duration of a loan in ISO 8601 duration format.
        minimumPremium:
          type: number
          description: >-
            Minimum premium amount to be paid for coverage concept, only valid
            if license.isVariablePremium is true.
        name:
          type: string
        portfolioCoverageCap:
          type: number
          description: >-
            For Surety licenses only (license.type = SURETY). Maximum total
            portfolio to be covered by this license.
        portfolioCoverageUsed:
          type: number
          description: >-
            For Surety licenses only (license.type = SURETY). Total value of the
            loans covered under this license., representing what has been spent
            from the authorized portfolio coverage cap on this license.
        premium:
          type: number
          description: >-
            Percentage of the borrowed capital representing the premium to be
            paid.
        taxRate:
          type: number
          description: Tax rate to be applied to the premium amount.
        timezone:
          type: string
          description: >-
            Reference to the location from which the time zone should be taken
            for license management.
        type:
          type: integer
          enum:
            - 0
            - 1
          description: 0 = SURETY, 1 = FIRST_LOSS
        validityPeriod:
          type: string
          description: >-
            ISO 8601 duration. Validity period granted to the license since the
            last revision.
        createdAt:
          type: string
          format: date-time
          description: Timestamp of the license creation.
        organization:
          type: object
          description: >
            Present but NOT resolved on this endpoint — it always travels as an

            empty object. Every license returned here belongs to the
            organization

            that owns the API key, so there is nothing to disambiguate and

            resolving the reference per row would be wasted work.
    Pagination:
      type: object
      description: Cursor-like pagination structure returned alongside results.
      properties:
        startCursor:
          type: string
          nullable: true
          description: UID of the first item in the current page.
        endCursor:
          type: string
          nullable: true
          description: UID of the last item in the current page.
        hasNextPage:
          type: boolean
          description: Indicates if there is a next page available.
        hasPreviousPage:
          type: boolean
          description: Indicates if there is a previous page available.
        totalCount:
          type: integer
          description: Total number of items matching the query.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````