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

# Validate a license



## OpenAPI

````yaml /openapi.json post /api/v1/validate
openapi: 3.0.3
info:
  title: KeyPort Public API
  version: v1
  description: Public license validation and license lookup endpoints for KeyPort.
servers:
  - url: https://api.keyport.sbs
    description: Production API
security:
  - bearerAuth: []
paths:
  /api/v1/validate:
    post:
      summary: Validate a license
      operationId: validateLicense
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateRequest'
      responses:
        '200':
          description: Validation processed.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidateSuccess'
                  - $ref: '#/components/schemas/ValidateFailure'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '429':
          description: Daily limit exceeded.
          headers:
            Retry-After:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  schemas:
    ValidateRequest:
      type: object
      required:
        - license_key
      properties:
        license_key:
          type: string
          example: ABCD-EFGH-IJKL-MNOP
        version:
          type: string
          example: 2.1.0
        device_id:
          type: string
          example: desktop-main
    ValidateSuccess:
      type: object
      properties:
        valid:
          type: boolean
          example: true
        status:
          type: string
          example: active
        expires:
          type: string
          format: date-time
          nullable: true
          example: '2027-01-01T00:00:00.000Z'
        ip_registered:
          type: boolean
          nullable: true
          example: false
        ip_count:
          type: integer
          nullable: true
          example: 1
        max_ips:
          type: integer
          nullable: true
          example: 1
        version:
          type: string
          nullable: true
          example: 2.1.0
        version_valid:
          type: boolean
          nullable: true
          example: true
        custom:
          type: object
          nullable: true
          additionalProperties: true
          example:
            tier: pro
            exports: true
        signature:
          type: string
          nullable: true
          example: null
    ValidateFailure:
      type: object
      properties:
        valid:
          type: boolean
          example: false
        status:
          type: string
          example: expired
        expires:
          type: string
          format: date-time
          nullable: true
          example: null
        ip_registered:
          type: boolean
          nullable: true
          example: false
        ip_count:
          type: integer
          nullable: true
          example: null
        max_ips:
          type: integer
          nullable: true
          example: null
        version:
          type: string
          nullable: true
          example: null
        version_valid:
          type: boolean
          nullable: true
          example: null
        custom:
          type: object
          nullable: true
          additionalProperties: true
          example: null
        signature:
          type: string
          nullable: true
          example: null
    UnauthorizedError:
      type: object
      properties:
        valid:
          type: boolean
          example: false
        status:
          type: string
          example: invalid_api_key
        message:
          type: string
          example: >-
            Missing Authorization header. Use: Authorization: Bearer
            YOUR_API_KEY
    RateLimitError:
      type: object
      properties:
        valid:
          type: boolean
          example: false
        status:
          type: string
          example: rate_limit_exceeded
        message:
          type: string
          example: >-
            This license provider or organization owner has reached the daily
            API request limit for their current plan. Please ask them to upgrade
            to a paid plan for higher limits, or try again after midnight UTC.
        retry_after:
          type: integer
          example: 3600
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your product API key in the Authorization header.

````