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

# Create License Key

> Generate a new license key with custom duration, HWID binding rules, activation modes, and optional metadata notes.



## OpenAPI

````yaml /api-reference/openapi/qpapel.json post /keys
openapi: 3.0.3
info:
  title: qPapel Protection Web API
  version: 1.0.0
  description: >
    qPapel Protection API provides developer-grade license validation, remote
    software configuration, staff URL delegation, client anti-cheat heuristics,
    and Discord community integration for desktop applications and loaders.
  contact:
    name: PapelShip Developer Support
    url: https://papelship.com
servers:
  - url: https://app.papelship.com/api/qpapel/v1
    description: Production Server
security:
  - BearerAuth: []
  - ApiKeyHeader: []
  - ApiKeyHeaderLegacy: []
tags:
  - name: License Keys
    description: >-
      Programmatic management of customer license keys, hardware ID bindings,
      activations, and bans.
  - name: Reseller Keys
    description: >-
      Multi-seat reseller key creation, extension, duration freeze, and license
      allocation.
  - name: Remote Settings
    description: >-
      Secure remote runtime configuration mapping, build SHA-256 verification,
      and dynamic values.
  - name: Staff Management
    description: Temporary and scope-limited web portal URLs for support moderators.
  - name: Discord Integrations
    description: >-
      Guild linkage, anti-cheat event channel streaming, and role-based bot
      permissions.
  - name: Client Security & Anti-Cheat
    description: >-
      Device fingerprint monitoring, process blacklists, window title filters,
      and server-side protected strings/files.
paths:
  /keys:
    post:
      tags:
        - License Keys
      summary: Create License Key
      description: >-
        Generate a new license key with custom duration, HWID binding rules,
        activation modes, and optional metadata notes.
      operationId: createLicenseKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_id
                - days
              properties:
                product_id:
                  type: integer
                  description: Unique numeric database ID of the target product.
                  example: 101
                days:
                  type: integer
                  description: >-
                    Validity duration in days (or hours if key_type is
                    hour_limited).
                  example: 30
                key_type:
                  type: string
                  description: Licensing behavior model.
                  enum:
                    - time_limited
                    - single_use
                    - multi_use
                    - time_restricted
                    - hour_limited
                  default: time_limited
                  example: time_limited
                note:
                  type: string
                  description: Internal reference notes or customer identifier.
                  example: Order
                max_uses:
                  type: integer
                  description: Maximum activations allowed before key locks out.
                  default: 1
                  example: 1
                bind_hwid:
                  type: boolean
                  description: Enforce hardware ID locking on first machine activation.
                  default: true
                  example: true
                auto_start:
                  type: boolean
                  description: >-
                    If true, expiry countdown begins upon generation rather than
                    on first client use.
                  default: false
                  example: false
                amount:
                  type: integer
                  description: Quantity of keys to generate in bulk (max 100).
                  default: 1
                  example: 1
      responses:
        '200':
          description: License key created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Key created successfully
                  key:
                    type: string
                    example: ABCD-EFGH-IJKL-USER
                  id:
                    type: integer
                    example: 542
                  type:
                    type: string
                    example: time_limited
                  product:
                    type: string
                    example: cs2_cheat
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  responses:
    BadRequestError:
      description: Invalid request body or query parameter structure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardErrorResponse'
          example:
            success: false
            error: Missing required field or invalid value
    UnauthorizedError:
      description: Authentication failed. Missing or invalid developer API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardErrorResponse'
          example:
            success: false
            error: Unauthorized access. Valid API key required.
    ForbiddenError:
      description: Insufficient permissions or subscription tier limits reached.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardErrorResponse'
          example:
            success: false
            error: Plan limit reached for this resource
  schemas:
    StandardErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Invalid parameters provided
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        Standard HTTP Bearer token authentication header (e.g. `Authorization:
        Bearer pk_live_...`).
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Custom header API key authentication parameter (`x-api-key:
        pk_live_...`).
    ApiKeyHeaderLegacy:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Legacy custom header API key fallback parameter (`api-key:
        pk_live_...`).

````