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

# Update Annotation Template



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json patch /v2/projects/{project_id}/annotation/templates/{template_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/annotation/templates/{template_id}:
    patch:
      tags:
        - annotation
      summary: Update Annotation Template
      operationId: >-
        update_annotation_template_v2_projects__project_id__annotation_templates__template_id__patch
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Template Id
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationTemplateUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationTemplateDB'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    AnnotationTemplateUpdate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        criteria:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Criteria
      type: object
      required:
        - name
        - criteria
      title: AnnotationTemplateUpdate
    AnnotationTemplateDB:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        include_explanation:
          type: boolean
          title: Include Explanation
        criteria:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Criteria
        constraints:
          oneOf:
            - $ref: >-
                #/components/schemas/api__schemas__annotation__LikeDislikeConstraints
            - $ref: '#/components/schemas/api__schemas__annotation__StarConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__ScoreConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__TagsConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__TextConstraints'
          title: Constraints
          discriminator:
            propertyName: annotation_type
            mapping:
              like_dislike:
                $ref: >-
                  #/components/schemas/api__schemas__annotation__LikeDislikeConstraints
              score:
                $ref: >-
                  #/components/schemas/api__schemas__annotation__ScoreConstraints
              star:
                $ref: '#/components/schemas/api__schemas__annotation__StarConstraints'
              tags:
                $ref: '#/components/schemas/api__schemas__annotation__TagsConstraints'
              text:
                $ref: '#/components/schemas/api__schemas__annotation__TextConstraints'
        id:
          type: string
          format: uuid4
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Created By
        position:
          type: integer
          title: Position
        usage_count:
          type: integer
          title: Usage Count
          description: Number of annotation ratings using the template.
      type: object
      required:
        - name
        - include_explanation
        - constraints
        - id
        - created_at
        - created_by
        - position
        - usage_count
      title: AnnotationTemplateDB
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    api__schemas__annotation__LikeDislikeConstraints:
      properties:
        annotation_type:
          type: string
          const: like_dislike
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: LikeDislikeConstraints
    api__schemas__annotation__StarConstraints:
      properties:
        annotation_type:
          type: string
          const: star
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: StarConstraints
    api__schemas__annotation__ScoreConstraints:
      properties:
        annotation_type:
          type: string
          const: score
          title: Annotation Type
        min:
          type: integer
          minimum: 0
          title: Min
        max:
          type: integer
          minimum: 0
          title: Max
      type: object
      required:
        - annotation_type
        - min
        - max
      title: ScoreConstraints
    api__schemas__annotation__TagsConstraints:
      properties:
        annotation_type:
          type: string
          const: tags
          title: Annotation Type
        tags:
          items:
            type: string
            maxLength: 255
            minLength: 1
          type: array
          title: Tags
        allow_other:
          type: boolean
          title: Allow Other
          default: false
      type: object
      required:
        - annotation_type
        - tags
      title: TagsConstraints
    api__schemas__annotation__TextConstraints:
      properties:
        annotation_type:
          type: string
          const: text
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: TextConstraints
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````