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

# Update Release

> Update an existing release. Supports optional file upload/replacement via multipart/form-data.

The request body must be sent as `multipart/form-data` with:
- `data` field (required): JSON string containing the release configuration
- `file` field (optional): Binary file to attach to the release (max 10 MB)

**File handling:**
- To upload a new file (replacing any existing): include the `file` field
- To keep the existing file unchanged: omit the `file` field and set `keepExistingFile` to `true`
- To remove the existing file without uploading a new one: omit the `file` field and set `keepExistingFile` to `false`

File uploads require the team to have the classloader feature enabled (paid subscription).




## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/dev/teams/{teamId}/releases/{releaseId}
openapi: 3.0.1
info:
  title: Lukittu API
  description: >
    The Lukittu API provides comprehensive license management and verification
    services for software products.


    ## Authentication


    **Client Endpoints** (`/api/v1/client/*`): No authentication required. These
    are public endpoints for license verification.


    **Developer Endpoints** (`/api/v1/dev/*`): Require API key authentication
    via Bearer token.


    ## API Types


    - **Client API**: Used by your software to verify licenses, send heartbeats,
    and download releases

    - **Developer API**: Used for programmatic license management from your
    backend systems


    ## Rate Limiting


    All endpoints are rate-limited to prevent abuse. If you exceed the rate
    limit, you'll receive a 429 status code.


    ## Response Format


    All responses follow a consistent format with `data` and `result` objects:


    ```json

    {
      "data": {}, // Response data (null for errors)
      "result": {
        "timestamp": "2023-09-15T14:30:00Z",
        "valid": true,
        "details": "Human-readable message",
        "code": "SUCCESS_CODE" // Optional error/success code
      }
    }

    ```
  version: 1.0.0
  contact:
    name: Lukittu Community
    url: https://discord.lukittu.com
servers:
  - url: https://app.lukittu.com
    description: Production server
security: []
tags:
  - name: Client - Verify
    description: >
      Client endpoints for license verification, heartbeat monitoring, and file
      downloads.

      These endpoints are used directly by your software applications.
  - name: Dev - Licenses
    description: |
      Developer endpoints for license management operations.
      These endpoints require API key authentication.
  - name: Dev - Customers
    description: |
      Developer endpoints for customer management operations.
      These endpoints require API key authentication.
  - name: Dev - Releases
    description: |
      Developer endpoints for release management operations.
      These endpoints require API key authentication.
  - name: Dev - Statistics
    description: |
      Developer endpoints for retrieving team usage statistics.
      These endpoints require API key authentication.
paths:
  /api/v1/dev/teams/{teamId}/releases/{releaseId}:
    put:
      tags:
        - Dev - Releases
      summary: Update Release
      description: >
        Update an existing release. Supports optional file upload/replacement
        via multipart/form-data.


        The request body must be sent as `multipart/form-data` with:

        - `data` field (required): JSON string containing the release
        configuration

        - `file` field (optional): Binary file to attach to the release (max 10
        MB)


        **File handling:**

        - To upload a new file (replacing any existing): include the `file`
        field

        - To keep the existing file unchanged: omit the `file` field and set
        `keepExistingFile` to `true`

        - To remove the existing file without uploading a new one: omit the
        `file` field and set `keepExistingFile` to `false`


        File uploads require the team to have the classloader feature enabled
        (paid subscription).
      operationId: updateRelease
      parameters:
        - $ref: '#/components/parameters/TeamId'
        - $ref: '#/components/parameters/ReleaseIdPath'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: string
                  description: >
                    JSON string containing the release configuration. Must be a
                    valid JSON object with the following fields:

                    - `version` (string, required): Release version (3-255
                    chars, no spaces)

                    - `productId` (string, required): UUID of the product

                    - `status` (string, required): One of PUBLISHED, DRAFT,
                    DEPRECATED, ARCHIVED

                    - `setAsLatest` (boolean, required): Whether to set this as
                    the latest release

                    - `keepExistingFile` (boolean, required): Whether to keep
                    the existing file when no new file is uploaded

                    - `branchId` (string|null, required): UUID of the branch or
                    null

                    - `metadata` (array, required): Array of key-value metadata
                    objects (max 20)

                    - `licenseIds` (array, required): Array of license UUIDs to
                    restrict access (max 30)
                file:
                  type: string
                  format: binary
                  description: >-
                    Optional file to attach to the release (max 10 MB). Must
                    have a file extension. Replaces any existing file.
      responses:
        '200':
          description: Release updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseResponse'
              example:
                data:
                  id: 456e7890-e89b-12d3-a456-426614174111
                  version: 1.1.0
                  status: PUBLISHED
                  latest: true
                  productId: 789e0123-e89b-12d3-a456-426614174222
                  branchId: null
                  teamId: 123e4567-e89b-12d3-a456-426614174000
                  createdAt: '2023-09-15T14:30:00Z'
                  updatedAt: '2023-09-15T14:35:00Z'
                  metadata: []
                  product:
                    id: 789e0123-e89b-12d3-a456-426614174222
                    name: My Product
                  branch: null
                  file: null
                result:
                  timestamp: '2023-09-15T14:35:00Z'
                  valid: true
                  details: Release updated
        4XX:
          $ref: '#/components/responses/StandardError'
        5XX:
          $ref: '#/components/responses/StandardError'
      security:
        - bearerAuth: []
components:
  parameters:
    TeamId:
      name: teamId
      in: path
      required: true
      description: >-
        Your team's UUID. You can find this value in your team's settings on the
        Lukittu dashboard.
      schema:
        $ref: '#/components/schemas/UUID'
      example: 123e4567-e89b-12d3-a456-426614174000
    ReleaseIdPath:
      name: releaseId
      in: path
      required: true
      description: The unique identifier (UUID v4) of the release.
      schema:
        $ref: '#/components/schemas/UUID'
      example: 456e7890-e89b-12d3-a456-426614174111
  schemas:
    ReleaseResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            data:
              allOf:
                - $ref: '#/components/schemas/ReleaseData'
                - type: object
                  properties:
                    metadata:
                      $ref: '#/components/schemas/Metadata'
                    product:
                      $ref: '#/components/schemas/ProductData'
                    branch:
                      type: object
                      nullable: true
                      properties:
                        id:
                          $ref: '#/components/schemas/UUID'
                        name:
                          type: string
                    file:
                      $ref: '#/components/schemas/ReleaseFileData'
    UUID:
      type: string
      format: uuid
      description: UUID v4 identifier
    SuccessResponse:
      type: object
      properties:
        data:
          type: object
          description: Response data
        result:
          allOf:
            - $ref: '#/components/schemas/StandardResult'
            - type: object
              properties:
                valid:
                  type: boolean
                  enum:
                    - true
                  description: Always true for success responses
      required:
        - data
        - result
    ReleaseData:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        version:
          $ref: '#/components/schemas/Version'
        status:
          $ref: '#/components/schemas/ReleaseStatus'
        latest:
          type: boolean
          description: Whether this is the latest release for the product/branch
        productId:
          $ref: '#/components/schemas/UUID'
        branchId:
          $ref: '#/components/schemas/UUID'
          nullable: true
          description: Branch this release belongs to
        teamId:
          $ref: '#/components/schemas/UUID'
          description: Team that owns this release
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - version
        - status
        - latest
        - productId
        - teamId
        - createdAt
        - updatedAt
    Metadata:
      type: array
      description: Key-value metadata pairs
      items:
        type: object
        properties:
          key:
            type: string
            description: Metadata key
          value:
            type: string
            description: Metadata value
          locked:
            type: boolean
            description: Whether this metadata field is locked from client modification
        required:
          - key
          - value
          - locked
    ProductData:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UUID'
          description: Unique product identifier
        name:
          type: string
          description: Product name
        url:
          type: string
          nullable: true
          description: Product URL or homepage
        metadata:
          $ref: '#/components/schemas/Metadata'
        teamId:
          $ref: '#/components/schemas/UUID'
          description: Team that owns this product
        createdByUserId:
          $ref: '#/components/schemas/UUID'
          description: User who created this product
        createdAt:
          type: string
          format: date-time
          description: Product creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Product last update timestamp
      required:
        - id
        - name
        - teamId
        - createdByUserId
        - createdAt
        - updatedAt
    ReleaseFileData:
      type: object
      nullable: true
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        key:
          type: string
          description: S3 storage key
        size:
          type: integer
          description: File size in bytes
        name:
          type: string
          description: Original file name
        checksum:
          type: string
          description: MD5 checksum of the file
        mainClassName:
          type: string
          nullable: true
          description: Main class name (for JAR files)
      required:
        - id
        - key
        - size
        - name
        - checksum
    ErrorResponse:
      type: object
      properties:
        data:
          type: object
          description: Additional error-related data
          nullable: true
        result:
          allOf:
            - $ref: '#/components/schemas/StandardResult'
            - type: object
              properties:
                valid:
                  type: boolean
                  enum:
                    - false
                  description: Always false for error responses
                code:
                  type: string
                  description: Error code indicating the specific issue
                  enum:
                    - INTERNAL_SERVER_ERROR
                    - BAD_REQUEST
                    - LICENSE_NOT_FOUND
                    - IP_LIMIT_REACHED
                    - HWID_LIMIT_REACHED
                    - PRODUCT_NOT_FOUND
                    - CUSTOMER_NOT_FOUND
                    - LICENSE_EXPIRED
                    - LICENSE_SUSPENDED
                    - TEAM_NOT_FOUND
                    - RATE_LIMIT
                    - HARDWARE_IDENTIFIER_BLACKLISTED
                    - COUNTRY_BLACKLISTED
                    - IP_BLACKLISTED
                    - RELEASE_NOT_FOUND
                    - FORBIDDEN
                    - UNAUTHORIZED
                    - INVALID_SESSION_KEY
                    - NO_ACCESS_TO_RELEASE
                    - RELEASE_ARCHIVED
                    - RELEASE_DRAFT
              required:
                - code
      required:
        - result
    StandardResult:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the response was generated
        valid:
          type: boolean
          description: Indicates whether the operation was successful
        details:
          type: string
          description: Human-readable description of the result
      required:
        - timestamp
        - valid
        - details
    Version:
      type: string
      minLength: 3
      maxLength: 255
      pattern: ^[^\s]+$
      description: Software version identifier (no spaces allowed)
    ReleaseStatus:
      type: string
      enum:
        - PUBLISHED
        - DRAFT
        - ARCHIVED
        - DEPRECATED
      description: Status of a product release
  responses:
    StandardError:
      description: >
        Standard API error response. All errors follow the same `{data, result}`
        structure.

        The HTTP status code indicates the general error category, while
        `result.code` provides specific error details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: apiKey
      description: >
        API key authentication for development endpoints.


        You can create API keys in your team's settings on the Lukittu
        dashboard.

        Include the API key in the Authorization header as: `Bearer
        YOUR_API_KEY`


        Example:

        ```

        Authorization: Bearer lukittu_api_key_abc123def456...

        ```

````