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

# Update label metadata

> Updates human-facing label metadata only: `name`, `description`, and `disabled`. Unknown JSON fields such as rule text are ignored. This RPC cannot create, mutate, or delete versions. To change a rule, create a new version.



## OpenAPI

````yaml /openapi.json patch /v1/labels/{labelId}
openapi: 3.0.0
info:
  title: Clavata Public API v1
  description: Endpoints for creating and managing jobs via the Clavata Public API.
  version: 1.0.0
  contact:
    name: Clavata.ai
    url: https://clavata.ai
    email: support@clavata.ai
servers:
  - url: https://gateway.app.clavata.ai:8443
security:
  - Bearer_Token: []
tags:
  - name: Public API
    description: Endpoints for creating and managing jobs via the Clavata Public API.
paths:
  /v1/labels/{labelId}:
    patch:
      tags:
        - Labels
      summary: Update label metadata
      description: >-
        Updates human-facing label metadata only: `name`, `description`, and
        `disabled`. Unknown JSON fields such as rule text are ignored. This RPC
        cannot create, mutate, or delete versions. To change a rule, create a
        new version.
      operationId: LabelsService_UpdateLabel
      parameters:
        - name: labelId
          description: The label ID to update
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LabelsServiceUpdateLabelBody'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1UpdateLabelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    LabelsServiceUpdateLabelBody:
      type: object
      properties:
        name:
          type: string
          description: >-
            Optional metadata updates. This request has no field for rule
            content; unknown JSON fields are ignored.
        disabled:
          type: boolean
        description:
          type: string
          description: >-
            Optional human-facing description of the label. Does not change any
            version's rule content.
    v1UpdateLabelResponse:
      type: object
      properties:
        label:
          $ref: '#/components/schemas/sharedv1Label'
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    sharedv1Label:
      type: object
      properties:
        labelId:
          type: string
          title: The label ID as set in the database
        name:
          type: string
          title: The display name of the label
        customerId:
          type: string
          title: The customer ID that owns this label
        policyId:
          type: string
          title: The policy ID this label is scoped to (empty for independent labels)
        disabled:
          type: boolean
          title: If the label is disabled, it will not be used during evaluation
        created:
          type: string
          format: date-time
          title: The time the label was created
        updated:
          type: string
          format: date-time
          title: The time the label was updated
        expunged:
          type: boolean
          title: If the label is soft-deleted, this is set to true
        description:
          type: string
          title: Optional description for this label
        archivedAt:
          type: string
          format: date-time
          title: Time the label was archived (nil if not archived)
        tags:
          type: array
          items:
            $ref: '#/components/schemas/v1LabelTag'
          title: Tags associated with this label
        importProvenance:
          $ref: '#/components/schemas/v1LabelImportProvenance'
      description: >-
        Label is a first-class, referenceable label entity (V2).

        Labels can be policy-scoped (policy_id set) or independent (policy_id
        empty).

        Policy-scoped labels are uniquely identified by (customer_id, name,
        policy_id).

        Independent labels are uniquely identified by (customer_id, name).
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v1LabelTag:
      type: object
      properties:
        labelTagId:
          type: string
          title: The tag ID
        customerId:
          type: string
          title: The customer ID that owns this tag
        name:
          type: string
          title: The tag name (case-insensitive unique per customer)
        color:
          type: string
          title: Optional hex color code (e.g., "#FF5733")
        created:
          type: string
          format: date-time
          title: When the tag was created
        updated:
          type: string
          format: date-time
          title: When the tag was last updated
        expunged:
          type: boolean
          title: If the tag is soft-deleted
      description: LabelTag represents an organizational tag for labels.
    v1LabelImportProvenance:
      type: object
      properties:
        libraryLabelId:
          type: string
          description: Opaque source library catalog id (library_labels.id).
        libraryVersionId:
          type: string
          description: >-
            The library label version id that was imported (the pinned published
            version).
        libraryName:
          type: string
          description: >-
            The library entry's display name at import time (denormalized for
            stable display).
        importedAt:
          type: string
          format: date-time
          description: When the original import happened.
      description: >-
        LabelImportProvenance records where a label's library-derived lineage
        began.

        Set on labels created via LabelLibraryService.ImportLibraryLabel and
        preserved

        on clones derived from them.
  securitySchemes:
    Bearer_Token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````