> ## 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.

# Delete a label

> Soft-deletes a label that has no versions. If any versions exist (including soft-deleted versions), the call fails with FAILED_PRECONDITION. Versions are immutable and have no delete RPC; archive the label instead when it has versions. Dataset examples attached to the label are not deleted independently — they belong to the label and are not versioned.



## OpenAPI

````yaml /openapi.json delete /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}:
    delete:
      tags:
        - Labels
      summary: Delete a label
      description: >-
        Soft-deletes a label that has no versions. If any versions exist
        (including soft-deleted versions), the call fails with
        FAILED_PRECONDITION. Versions are immutable and have no delete RPC;
        archive the label instead when it has versions. Dataset examples
        attached to the label are not deleted independently — they belong to the
        label and are not versioned.
      operationId: LabelsService_DeleteLabel
      parameters:
        - name: labelId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1DeleteLabelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v1DeleteLabelResponse:
      type: object
      properties:
        labelId:
          type: string
        deleted:
          type: boolean
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
  securitySchemes:
    Bearer_Token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````