---
title: "Update annotation queue label schema"
method: PUT
path: "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema"
tags: ["LLM Observability"]
---

# Update annotation queue label schema

`PUT /api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema`

Create or replace the label schema for a given annotation queue.
The label schema defines the labels annotators can apply to interactions in the queue.
Label names must be unique within the queue and match the pattern `^[a-zA-Z0-9_-]+$`.
Each label must have a valid type: score, categorical, boolean, or text.

## Path parameters

- `queue_id` string, required

## Request body

- LLMObsAnnotationQueueLabelSchemaUpdateRequest — Request to update the label schema of an annotation queue.
  - `data` LLMObsAnnotationQueueLabelSchemaUpdateData, required — Data object for updating an annotation queue label schema.
    - `attributes` LLMObsAnnotationQueueLabelSchemaUpdateAttributes, required — Attributes for updating an annotation queue label schema.
      - `annotation_schema` LLMObsAnnotationSchema, required — Schema defining the labels for an annotation queue.
        - `label_schemas` LLMObsLabelSchema[], required — List of label schema definitions.
          - `description` string — Description of the label.
          - `has_assessment` boolean — Whether this label includes an assessment field.
          - `has_reasoning` boolean — Whether this label includes a reasoning field.
          - `id` string — Unique identifier of the label schema. Assigned by the server if not provided.
          - `is_assessment` boolean — Whether the boolean label represents an assessment. Requires `has_assessment` to be true.
          - `is_integer` boolean — Whether score values must be integers. Applicable to score-type labels.
          - `is_required` boolean — Whether this label is required for an annotation.
          - `max` number, double — Maximum value for score-type labels.
          - `min` number, double — Minimum value for score-type labels.
          - `name` string, required — Name of the label. Must match the pattern `^[a-zA-Z0-9_-]+$` and be unique within the queue.
          - `type` 'score' | 'categorical' | 'boolean' | 'text', required — Type of a label in an annotation queue label schema.
          - `values` string[] — Allowed values for categorical-type labels. Must contain at least one non-empty, unique value.
    - `type` 'queues', required — Resource type of an LLM Observability annotation queue.

## Response `200`

OK

- LLMObsAnnotationQueueLabelSchemaResponse — Response containing the label schema of an annotation queue.
  - `data` LLMObsAnnotationQueueLabelSchemaData, required — Data object for an annotation queue label schema.
    - `attributes` LLMObsAnnotationQueueLabelSchemaAttributes, required — Attributes of an annotation queue label schema.
      - `annotation_schema` LLMObsAnnotationSchema, required — Schema defining the labels for an annotation queue.
        - `label_schemas` LLMObsLabelSchema[], required — List of label schema definitions.
          - `description` string — Description of the label.
          - `has_assessment` boolean — Whether this label includes an assessment field.
          - `has_reasoning` boolean — Whether this label includes a reasoning field.
          - `id` string — Unique identifier of the label schema. Assigned by the server if not provided.
          - `is_assessment` boolean — Whether the boolean label represents an assessment. Requires `has_assessment` to be true.
          - `is_integer` boolean — Whether score values must be integers. Applicable to score-type labels.
          - `is_required` boolean — Whether this label is required for an annotation.
          - `max` number, double — Maximum value for score-type labels.
          - `min` number, double — Minimum value for score-type labels.
          - `name` string, required — Name of the label. Must match the pattern `^[a-zA-Z0-9_-]+$` and be unique within the queue.
          - `type` 'score' | 'categorical' | 'boolean' | 'text', required — Type of a label in an annotation queue label schema.
          - `values` string[] — Allowed values for categorical-type labels. Must contain at least one non-empty, unique value.
    - `id` string, required — Unique identifier of the annotation queue.
    - `type` 'queues', required — Resource type of an LLM Observability annotation queue.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/datadog/apis/api-v2.md) · [All operations](https://skmtc.dev/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
