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

# Provision Workspace License

> Bind a Keygen license to a workspace.

Validates the key against Keygen, stores it encrypted, records
``keygen_license_id`` / expiry / type on the subscription, and busts the
per-workspace license cache so the change takes effect immediately.



## OpenAPI

````yaml /api-reference/openapi.json post /api/platform/workspaces/{workspace_id}/license
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
  description: >-
    The full Blindsight REST surface, generated from the running application.
    Replace the server host with your own deployment.


    For the Runtime Security integration surface (scan, proxy, tool calls) see
    the Runtime Security spec, which is hand written and carries worked
    examples.
servers:
  - url: https://api.your-blindsight.com
    description: Your Blindsight deployment
security: []
paths:
  /api/platform/workspaces/{workspace_id}/license:
    post:
      tags:
        - platform
      summary: Provision Workspace License
      description: |-
        Bind a Keygen license to a workspace.

        Validates the key against Keygen, stores it encrypted, records
        ``keygen_license_id`` / expiry / type on the subscription, and busts the
        per-workspace license cache so the change takes effect immediately.
      operationId: >-
        provision_workspace_license_api_platform_workspaces__workspace_id__license_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceLicenseProvision'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceLicenseProvisionResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkspaceLicenseProvision:
      properties:
        license_key:
          type: string
          minLength: 8
          title: License Key
          description: Keygen license key to bind to this workspace.
        plan_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Slug
          description: >-
            Optional plan to attach (sets numeric limits). Required when the
            workspace has no subscription yet.
      type: object
      required:
        - license_key
      title: WorkspaceLicenseProvision
    WorkspaceLicenseProvisionResult:
      properties:
        workspace_id:
          type: string
          title: Workspace Id
        keygen_license_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Keygen License Id
        masked_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Masked Key
        license_type:
          anyOf:
            - type: string
            - type: 'null'
          title: License Type
        plan_tier:
          type: string
          title: Plan Tier
          default: trial
        is_valid:
          type: boolean
          title: Is Valid
        status:
          type: string
          title: Status
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - workspace_id
        - is_valid
        - status
      title: WorkspaceLicenseProvisionResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````