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

# Update Annotation

> Update an annotation.



## OpenAPI

````yaml patch /api/v1/datasets/{dataset_id}/annotation-sets/{annotation_set_id}/annotations/{annotation_id}
openapi: 3.1.0
info:
  title: Relay API
  description: Voice AI Artifact Detection Platform
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/datasets/{dataset_id}/annotation-sets/{annotation_set_id}/annotations/{annotation_id}:
    patch:
      tags:
        - annotations
      summary: Update Annotation
      description: Update an annotation.
      operationId: >-
        update_annotation_api_v1_datasets__dataset_id__annotation_sets__annotation_set_id__annotations__annotation_id__patch
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Dataset Id
        - name: annotation_set_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Annotation Set Id
        - name: annotation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Annotation Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AnnotationUpdate:
      properties:
        artifact_type:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Artifact Type
        start_ms:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Start Ms
        end_ms:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: End Ms
        confidence:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Confidence
        extra_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Data
      type: object
      title: AnnotationUpdate
      description: Request to update an annotation.
    AnnotationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        annotation_set_id:
          type: string
          format: uuid
          title: Annotation Set Id
        audio_file_id:
          type: string
          format: uuid
          title: Audio File Id
        artifact_type:
          type: string
          title: Artifact Type
        start_ms:
          type: integer
          title: Start Ms
        end_ms:
          type: integer
          title: End Ms
        confidence:
          type: number
          title: Confidence
        extra_data:
          additionalProperties: true
          type: object
          title: Extra Data
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - annotation_set_id
        - audio_file_id
        - artifact_type
        - start_ms
        - end_ms
        - confidence
        - extra_data
        - created_at
      title: AnnotationResponse
      description: Annotation response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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: X-API-Key

````