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

# Update License Key

> This endpoint updates the details of an existing license key identified by its `id`. It allows changing the `expires_at`, `activation_limit`, or `status`. The update operation is restricted to only allowed fields. Ensure store ownership using the `x-store-id` header.



## OpenAPI

````yaml /api-reference/blink-api.json patch /license-keys/{id}
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
tags:
  - name: Invoices
    description: Unified merchant of record invoices for products and subscriptions.
  - name: Geo Pricing
    description: Resolve Purchasing Power Parity (PPP) localized pricing.
paths:
  /license-keys/{id}:
    patch:
      tags:
        - Deliverables
      summary: Update License Key
      description: >-
        This endpoint updates the details of an existing license key identified
        by its `id`. It allows changing the `expires_at`, `activation_limit`, or
        `status`. The update operation is restricted to only allowed fields.
        Ensure store ownership using the `x-store-id` header.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ID of the license key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLicenseKeyRequest'
      responses:
        '200':
          description: License key updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseKeyDetails'
        '400':
          description: Bad Request - No updatable fields provided.
        '401':
          description: Unauthorized - Store ID header missing.
        '404':
          description: License key not found.
      security:
        - storeIdHeader: []
components:
  schemas:
    UpdateLicenseKeyRequest:
      type: object
      properties:
        expires_at:
          type: string
          format: date-time
        activation_limit:
          type: integer
        status:
          type: string
    LicenseKeyDetails:
      type: object
      properties:
        id:
          type: string
        store_id:
          type: string
        key:
          type: string
        status:
          type: string
        activations:
          type: integer
        activation_limit:
          type: integer
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        product:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        customer:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
        order:
          type: object
          properties:
            id:
              type: string
            amount:
              type: number
            created_at:
              type: string
              format: date-time
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````