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

# Issue an offline license

> Signs a long-lived license for an air-gapped installation from an existing license, e.g. to
renew an offline license before it expires. Given an instance id, binds the license to it.



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json post /api/v1/licenses/{license_id}/offline
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Budgets
    description: >-
      Beta: may change before general availability. Spending limits on a
      customer's usage, or one subscription's, per currency, with alerts at
      percentages of the amount.
    x-beta: true
  - name: Checkout Sessions
  - name: Checks
    description: >-
      Beta: may change before general availability. Whether a customer may
      consume more of a feature right now.
    x-beta: true
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Credit units
    description: >-
      Custom denominations, such as "credits", that usage can be priced in and
      credit granted or sold in, instead of money.
  - name: Credits
    description: >-
      Prepaid credit: a customer's wallets, credit grants, ledger and top-ups.
      Promotional credit applies before tax like a discount; paid credit applies
      after tax like a payment.
  - name: Custom Properties
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Licenses
    description: >-
      Licenses for your customers' self-hosted installations: signed tokens
      carrying their plan's entitlements, activated and refreshed by the
      installation over the public licensing endpoints.
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
  - name: Usage costs
    description: >-
      Beta: may change before general availability. A customer's or a
      subscription's usage events and usage over time, with what they cost.
    x-beta: true
  - name: Webhook Endpoints
    description: Manage outbound webhook endpoints and inspect their deliveries
paths:
  /api/v1/licenses/{license_id}/offline:
    post:
      tags:
        - Licenses
      summary: Issue an offline license
      description: >-
        Signs a long-lived license for an air-gapped installation from an
        existing license, e.g. to

        renew an offline license before it expires. Given an instance id, binds
        the license to it.
      operationId: issue_offline_license
      parameters:
        - name: license_id
          in: path
          description: License ID
          required: true
          schema:
            $ref: '#/components/schemas/LicenseId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueOfflineLicenseRequest'
        required: true
      responses:
        '200':
          description: Signed offline license
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfflineLicense'
        '400':
          description: Bad request, or the license is bound to another installation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '403':
          description: Licensing is not included in the plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: License not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '409':
          description: The license is revoked, or its subscription is not active
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    LicenseId:
      type: string
      format: MeteroidId
      examples:
        - lic_7n42DGM5Tflk9n8mt7Fhc7
    IssueOfflineLicenseRequest:
      type: object
      required:
        - valid_days
      properties:
        instance_id:
          type:
            - string
            - 'null'
          description: >-
            The installation's id as it reports it, up to 255 characters without
            spaces: the license

            names it (`aud`) and stays bound to it. Without one, the license is
            not tied to one.
        valid_days:
          type: integer
          format: int32
          description: Lifetime of the offline license, 1 to 400 days.
          minimum: 0
    OfflineLicense:
      type: object
      required:
        - license
      properties:
        license:
          type: string
          description: >-
            The signed license (a JWT) to install in the air-gapped
            installation.
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOKEN_EXPIRED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.