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

# Activate a software license

> Registers a device or server installation against a license key. Server installations are bound to the configured domain, IP address, and installation-path policies. The license key is the credential; no bearer token is required.



## OpenAPI

````yaml /api-reference/openapi.json post /license/activate
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/activate:
    post:
      tags:
        - Licensing
      summary: Activate a software license
      description: >-
        Registers a device or server installation against a license key. Server
        installations are bound to the configured domain, IP address, and
        installation-path policies. The license key is the credential; no bearer
        token is required.
      operationId: POST_license_activate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LicenseActivationRequest'
      responses:
        '200':
          description: License activated or existing activation refreshed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseActivationResponse'
        '403':
          description: >-
            License is suspended, expired, deactivated, or registered to a
            different installation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseErrorResponse'
        '404':
          description: License key not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseErrorResponse'
        '422':
          description: Validation failed or the activation limit was reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseErrorResponse'
        '429':
          description: Rate limit exceeded
      security: []
components:
  schemas:
    LicenseActivationRequest:
      type: object
      properties:
        license_key:
          type: string
        instance:
          type: string
          maxLength: 255
          description: Stable device UUID or server installation identifier.
        instance_type:
          type: string
          enum:
            - device
            - server
        domain:
          type:
            - string
            - 'null'
          maxLength: 255
          description: Required for server activations.
        installation_path:
          type:
            - string
            - 'null'
          maxLength: 2048
          description: Required for server activations.
        device_name:
          type:
            - string
            - 'null'
          maxLength: 255
        operating_system:
          type:
            - string
            - 'null'
          maxLength: 255
        application_version:
          type:
            - string
            - 'null'
          maxLength: 100
      required:
        - license_key
        - instance
        - instance_type
      additionalProperties: false
    LicenseActivationResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        activated:
          type: boolean
        instance:
          type: string
        instance_type:
          type:
            - string
            - 'null'
          enum:
            - device
            - server
            - null
        domain:
          type:
            - string
            - 'null'
        activations_used:
          type: integer
          minimum: 0
        activation_limit:
          type:
            - integer
            - 'null'
          minimum: 1
      required:
        - success
        - activated
        - instance
        - instance_type
        - domain
        - activations_used
        - activation_limit
    LicenseErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        code:
          type: string
      required:
        - success
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Use `Authorization: Bearer <live_api_key>`.'

````