---
title: "Create an annotation queue"
method: POST
path: "/v2/annotation-queues"
tags: ["Annotation Queues"]
---

# Create an annotation queue

`POST /v2/annotation-queues`

Create a new annotation queue.

**Payload Requirements**
- The annotation queue name must be unique within the given space (among active queues).
- At least one `annotation_config_id` is required, and all configs must belong to the specified space.
- Do not include system-managed fields on input: `id`, `created_at`, `updated_at`.
- If `assignment_method` is not provided, it defaults to `"all"`.

**Valid example**
```json
{
  "name": "Quality Review Queue",
  "space_id": "spc_xyz789",
  "annotation_config_ids": ["ac_abc123"],
  "annotator_emails": ["reviewer@example.com"],
  "assignment_method": "all"
}
```

**Valid example with records**
```json
{
  "name": "Quality Review Queue",
  "space_id": "spc_xyz789",
  "annotation_config_ids": ["ac_abc123"],
  "annotator_emails": ["reviewer@example.com"],
  "records": [
    {"record_type": "SPAN", "project_id": "prj_abc", "start_time": "2024-01-15T00:00:00Z", "end_time": "2024-01-16T00:00:00Z", "span_ids": ["span_001"]},
    {"record_type": "EXAMPLE", "dataset_id": "ds_xyz", "example_ids": ["ex_001", "ex_002"]}
  ]
}
```

**Invalid example** (missing required annotation_config_ids)
```json
{
  "name": "My Queue",
  "space_id": "spc_xyz789"
}
```

<Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>

## Request body

- CreateAnnotationQueueRequest
  - `name` string, required — The name of the annotation queue. Must be unique within the space for active queues.
  - `space_id` string, required — The space ID that the annotation queue belongs to
  - `instructions` string — Instructions for annotators working on this queue
  - `annotation_config_ids` string[], required — IDs of annotation configs to associate with this queue. All configs must belong to the same space.
  - `annotator_emails` Email[], required — Email addresses of annotators to assign to the queue. Emails are resolved to user IDs server-side.
  - `assignment_method` 'ALL' | 'RANDOM' — How records are assigned to annotators. Defaults to "ALL". - `ALL`: Every annotator is assigned to every record. - `RANDOM`: Each record is randomly assigned to one annotator.
  - `record_sources` AnnotationQueueRecordInput[] — Record sources to add to the annotation queue on creation. At most 2 record sources (projects or datasets) may be provided in a single create request. The total number of records resolved from all sources must not exceed 500. Additional records from other sources can be added after creation.
    - union
      - AnnotationQueueExampleRecordInput
        - `record_type` 'EXAMPLE', required — Discriminator identifying this record source as dataset examples. Must be `EXAMPLE` for dataset example records.
        - `dataset_id` string, required — The dataset ID these examples belong to
        - `dataset_version_id` string — Optional. The specific dataset version to use. If omitted, the latest version is used.
        - `example_ids` string[] — Optional. List of example IDs within the dataset to add to the queue. If omitted, all examples in the dataset (or dataset version) are added, provided the total records from all sources does not exceed 500.
      - AnnotationQueueSpanRecordInput
        - `record_type` 'SPAN', required — Discriminator identifying this record source as project spans. Must be `SPAN` for span records.
        - `project_id` string, required — The project ID these spans belong to
        - `start_time` string, date-time, required — Start of the time range to search for spans. The range (end_time - start_time) must not exceed 7 days.
        - `end_time` string, date-time, required — End of the time range. Must be after start_time.
        - `span_ids` string[], required — List of span IDs to add to the queue
      - AnnotationQueueTraceRecordInput
        - `record_type` 'TRACE', required — Discriminator identifying this record as a trace record.
        - `project_id` string, required — The project ID these traces belong to.
        - `start_time` string, date-time, required — Start of the time range used to resolve each trace's root span. The range (end_time - start_time) must not exceed 7 days.
        - `end_time` string, date-time, required — End of the time range. Must be after start_time.
        - `trace_ids` string[], required — List of trace IDs to add to the queue.

## Response `201`

An annotation queue object

- AnnotationQueue
  - `id` string, required — The unique identifier for the annotation queue
  - `name` string, required — The name of the annotation queue
  - `space_id` string, required — The space id the annotation queue belongs to
  - `instructions` string, nullable — The instructions for the annotation queue
  - `annotation_configs` AnnotationConfig[] — The annotation configs associated with this queue
    - union
      - object
        - `id` string, required — The unique identifier for the annotation config
        - `name` string, required — The name of the annotation config
        - `created_at` string, date-time, required — The timestamp for when the annotation config was created
        - `space_id` string, required — The space id the annotation config belongs to
        - `type` 'CONTINUOUS', required — Discriminator value identifying a continuous annotation config.
        - `minimum_score` number, double, required — The minimum score value
        - `maximum_score` number, double, required — The maximum score value
        - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
      - object
        - `id` string, required — The unique identifier for the annotation config
        - `name` string, required — The name of the annotation config
        - `created_at` string, date-time, required — The timestamp for when the annotation config was created
        - `space_id` string, required — The space id the annotation config belongs to
        - `type` 'CATEGORICAL', required — Discriminator value identifying a categorical annotation config.
        - `values` CategoricalAnnotationValue[], required — An array of categorical annotation values
          - `label` string, required — The label value
          - `score` number, double — A score to associate with the label
        - `optimization_direction` 'MAXIMIZE' | 'MINIMIZE' | 'NONE' — The direction for optimization. Defaults to `NONE` when omitted. - MAXIMIZE: higher scores are better - MINIMIZE: lower scores are better - NONE: higher or lower scores are neither better nor worse
      - object
        - `id` string, required — The unique identifier for the annotation config
        - `name` string, required — The name of the annotation config
        - `created_at` string, date-time, required — The timestamp for when the annotation config was created
        - `space_id` string, required — The space id the annotation config belongs to
        - `type` 'FREEFORM', required — Discriminator value identifying a freeform annotation config.
  - `annotators` AnnotatorUser[], required — Users assigned as annotators to this queue
    - `id` string, required — The unique identifier for the user
    - `email` string, email, required — An email address
  - `created_at` string, date-time, required — The timestamp for when the annotation queue was created
  - `updated_at` string, date-time, required — The timestamp for when the annotation queue was last updated

## Other responses

- `400` — Invalid request
- `401` — Authentication is required
- `403` — Insufficient permissions to access this resource
- `404` — Not found
- `409` — Resource conflict
- `422` — Unprocessable entity
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/arize-ai/apis/arize-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-rest-api/versions/2ce448f1de13/schema)
