---
title: "Create Queue Template"
method: POST
path: "/annotation_queues/{queue_id}/templates"
tags: ["annotation_queue"]
---

# Create Queue Template

`POST /annotation_queues/{queue_id}/templates`

Create template(s) in an annotation queue.

Supports two scenarios:
1. Create a single template: Provide 'template' field
2. Copy all templates from source queue: Provide 'copy_from_queue_id' field

## Path parameters

- `queue_id` string, uuid4, required

## Request body

- CreateQueueTemplateRequest — Request to create templates in an annotation queue. Supports two scenarios: 1. Create a single template (template field) 2. Copy all templates from a source queue (copy_from_queue_id field)
  - `template` AnnotationTemplateCreate
    - `name` string, required
    - `include_explanation` boolean
    - `criteria` string, nullable
    - `constraints` union, required
      - ApiSchemasAnnotationLikeDislikeConstraints
        - `annotation_type` 'like_dislike', required
      - ApiSchemasAnnotationStarConstraints
        - `annotation_type` 'star', required
      - ApiSchemasAnnotationScoreConstraints
        - `annotation_type` 'score', required
        - `min` integer, required
        - `max` integer, required
      - ApiSchemasAnnotationTagsConstraints
        - `annotation_type` 'tags', required
        - `tags` string[], required
        - `allow_other` boolean
      - ApiSchemasAnnotationTextConstraints
        - `annotation_type` 'text', required
      - ApiSchemasAnnotationChoiceConstraints
        - `annotation_type` 'choice', required
        - `choices` string[], required
        - `allow_other` boolean
      - ApiSchemasAnnotationTreeChoiceConstraints
        - `annotation_type` 'tree_choice', required
        - `choices_tree` ApiSchemasAnnotationTreeChoiceNodeInput[], nullable
          - `label` string, required
          - `id` string, required
          - `children` ApiSchemasAnnotationTreeChoiceNodeInput[]
        - `choices_tree_yaml` string, nullable
  - `copy_from_queue_id` string, uuid4, nullable — Source queue ID to copy all templates from. Required if template is not provided.

## Response `200`

Successful Response

- AnnotationTemplateDB[]
  - `name` string, required
  - `include_explanation` boolean, required
  - `criteria` string, nullable
  - `constraints` union, required
    - ApiSchemasAnnotationLikeDislikeConstraints
      - `annotation_type` 'like_dislike', required
    - ApiSchemasAnnotationStarConstraints
      - `annotation_type` 'star', required
    - ApiSchemasAnnotationScoreConstraints
      - `annotation_type` 'score', required
      - `min` integer, required
      - `max` integer, required
    - ApiSchemasAnnotationTagsConstraints
      - `annotation_type` 'tags', required
      - `tags` string[], required
      - `allow_other` boolean
    - ApiSchemasAnnotationTextConstraints
      - `annotation_type` 'text', required
    - ApiSchemasAnnotationChoiceConstraints
      - `annotation_type` 'choice', required
      - `choices` string[], required
      - `allow_other` boolean
    - TreeChoiceDBConstraints
      - `annotation_type` 'tree_choice', required
      - `choices_tree` ApiSchemasAnnotationTreeChoiceNodeOutput[], required
        - `label` string, required
        - `id` string, required
        - `children` ApiSchemasAnnotationTreeChoiceNodeOutput[]
      - `choices_tree_yaml` string, required
  - `id` string, uuid4, required
  - `created_at` string, date-time, required
  - `created_by` string, uuid4, nullable, required
  - `position` integer, required
  - `usage_count` integer, required — Number of annotation ratings using the template.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.net/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/versions/933e8c8e6366/schema)
