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

# Update Case Label

> Update the label of an existing case.

Update the label of an existing case. Only the case owner can update the label.

## Best Practices

1. **Works on Locked Cases**: You can update a case label even after the case has been locked for analysis.
2. **Unique Labels (Case-Insensitive)**: Case labels must be unique per user regardless of letter casing. Updating a case label to one that only differs by case will return a `409 Conflict` response.
3. **Use Descriptive Labels**: Labels like claim numbers or policy numbers make cases easier to identify and manage.
4. **Reports Use the Label at Time of Generation**: If analysis has already completed, existing reports will not reflect the updated label.


## OpenAPI

````yaml PUT /cases/{id}
openapi: 3.1.0
info:
  title: Veridox Core API
  description: Veridox Core Platform API
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.uk.veridox.ai
    description: Live (UK)
  - url: https://api.ca.veridox.ai
    description: Live (CA)
security: []
tags:
  - name: Status
    description: System status and health check endpoints
  - name: Cases
    description: Case and case file management
  - name: Organisations
    description: Organisation management
  - name: Document Requests
    description: Document request management
  - name: Search
    description: Search functionality
  - name: Admin
    description: Administrative endpoints
paths:
  /cases/{id}:
    put:
      tags:
        - Cases
      summary: Update case label
      description: >-
        Updates the label of a case. Can be called on locked cases. Only the
        case owner can update the label.
      operationId: CasesController_updateCaseLabel
      parameters:
        - name: id
          required: true
          in: path
          description: Case ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCaseLabelDto'
      responses:
        '200':
          description: Case label updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseItemResponseDto'
        '400':
          description: Invalid label provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '404':
          description: Case not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '409':
          description: A case with the given label already exists for this user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
      security:
        - api-key: []
components:
  schemas:
    UpdateCaseLabelDto:
      type: object
      properties:
        label:
          type: string
          minLength: 1
          maxLength: 255
      required:
        - label
    CaseItemResponseDto:
      type: object
      properties:
        case_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
          x-nestjs_zod-uses-3-point-1-syntax: true
        label:
          anyOf:
            - type: string
            - type: 'null'
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-empty-type: true
        metadata:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-empty-type: true
        is_locked:
          type: boolean
          x-nestjs_zod-uses-3-point-1-syntax: true
        locked_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-empty-type: true
        file_analysis_status:
          type: string
          enum:
            - waiting_for_file_analysis
            - file_analysis_complete
          x-nestjs_zod-uses-3-point-1-syntax: true
        file_analysis_completed_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-empty-type: true
        created_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          x-nestjs_zod-uses-3-point-1-syntax: true
        updated_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          x-nestjs_zod-uses-3-point-1-syntax: true
        team_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          x-nestjs_zod-uses-3-point-1-syntax: true
        team_name:
          type: string
          x-nestjs_zod-uses-3-point-1-syntax: true
      required:
        - case_id
        - label
        - metadata
        - is_locked
        - locked_at
        - file_analysis_status
        - file_analysis_completed_at
        - created_at
        - updated_at
    ErrorDto:
      type: object
      properties:
        error_code:
          type: string
          description: Machine-readable error code for programmatic handling
          examples:
            - request.cases.file.missing-risk-score
            - request.authentication.invalid-token
            - request.forbidden
            - request.cases.case.not-found
            - request.cases.case.already-locked
        error_message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: >-
            User tried to perform an invalid operation on a file without a risk
            score.
        error_details:
          type: object
          example:
            field: email_address
      required:
        - error_code
        - error_message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````