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

# Validate a software license

> Validates an existing activation and refreshes its last-check timestamp. A valid response includes a short-lived Ed25519-signed offline token for temporary use when the API cannot be reached.



## OpenAPI

````yaml /api-reference/openapi.json post /license/validate
openapi: 3.1.0
info:
  title: BillingServ API V2
  description: >-
    Resources and tools for developers to integrate with the BillingServ v2 API.
    v1 is deprecated; use the v2 base URL and bearer-token authentication unless
    an endpoint states otherwise.
  version: '2.0'
servers:
  - url: https://demo.onlinebillingform.com/api/v2
    description: BillingServ demo API
security:
  - bearerAuth: []
tags:
  - name: Customer
  - name: Package
  - name: Group
  - name: Country
  - name: County
  - name: VPN
  - name: Invoice
  - name: Order
  - name: Module
  - name: Report
  - name: Marketing
  - name: Setting
  - name: Checkout
  - name: Usage
  - name: Support
  - name: Licensing
paths:
  /license/validate:
    post:
      tags:
        - Licensing
      summary: Validate a software license
      description: >-
        Validates an existing activation and refreshes its last-check timestamp.
        A valid response includes a short-lived Ed25519-signed offline token for
        temporary use when the API cannot be reached.
      operationId: POST_license_validate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LicenseValidationRequest'
      responses:
        '200':
          description: Validation completed. Inspect the `valid` and `reason` properties.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseValidationResponse'
        '404':
          description: License key not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseErrorResponse'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '429':
          description: Rate limit exceeded
      security: []
components:
  schemas:
    LicenseValidationRequest:
      type: object
      properties:
        license_key:
          type: string
        instance:
          type: string
          maxLength: 255
        domain:
          type:
            - string
            - 'null'
          maxLength: 255
        installation_path:
          type:
            - string
            - 'null'
          maxLength: 2048
        application_version:
          type:
            - string
            - 'null'
          maxLength: 100
      required:
        - license_key
        - instance
      additionalProperties: false
    LicenseValidationResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        valid:
          type: boolean
        status:
          $ref: '#/components/schemas/LicenseStatus'
        reason:
          type:
            - string
            - 'null'
          enum:
            - license_reissued
            - license_suspended
            - license_expired
            - license_revoked
            - activation_not_found
            - installation_mismatch
            - null
        activations_used:
          type: integer
          minimum: 0
        activation_limit:
          type:
            - integer
            - 'null'
          minimum: 1
        offline_token:
          type:
            - string
            - 'null'
          description: >-
            Ed25519-signed compact offline validation token; only returned when
            valid.
        offline_public_key:
          type:
            - string
            - 'null'
          description: Base64url-encoded Ed25519 public key.
        offline_expires_at:
          type:
            - integer
            - 'null'
          description: Unix timestamp at which the offline token expires.
      required:
        - success
        - valid
        - status
        - reason
        - activations_used
        - activation_limit
        - offline_token
        - offline_public_key
        - offline_expires_at
    LicenseErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        code:
          type: string
      required:
        - success
        - error
    ValidationErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        errors:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
              additionalProperties: true
            - type: string
      additionalProperties: true
    LicenseStatus:
      type: string
      enum:
        - active
        - reissued
        - suspended
        - expired
        - revoked
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Use `Authorization: Bearer <live_api_key>`.'

````