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

# Bulk Annotations

> Create, update, and/or delete annotations in a single call.

Each operation is independent — a failure in one does not roll back the others.
Maximum 1000 operations per type (creates, updates, deletes).



## OpenAPI

````yaml post /v1/annotations/bulk
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/annotations/bulk:
    post:
      tags:
        - Annotations
      summary: Bulk Annotations
      description: >-
        Create, update, and/or delete annotations in a single call.


        Each operation is independent — a failure in one does not roll back the
        others.

        Maximum 1000 operations per type (creates, updates, deletes).
      operationId: bulk_annotations_v1_annotations_bulk_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAnnotationsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkAnnotationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BulkAnnotationsRequest:
      properties:
        create:
          items:
            $ref: '#/components/schemas/BulkAnnotationCreate'
          type: array
          maxItems: 1000
          title: Create
          description: Annotations to create.
        update:
          items:
            $ref: '#/components/schemas/BulkAnnotationUpdate'
          type: array
          maxItems: 1000
          title: Update
          description: Annotations to update.
        delete:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Delete
          description: Annotation IDs to delete.
      type: object
      title: BulkAnnotationsRequest
      description: |-
        Bulk create, update, and/or delete annotations in a single call.

        Provide any combination of creates, updates, and deletes. Each operation
        is independent — a failure in one does not roll back the others.
    BulkAnnotationsResponse:
      properties:
        created_count:
          type: integer
          title: Created Count
          default: 0
        updated_count:
          type: integer
          title: Updated Count
          default: 0
        deleted_count:
          type: integer
          title: Deleted Count
          default: 0
        failed_count:
          type: integer
          title: Failed Count
          default: 0
        results:
          items:
            $ref: '#/components/schemas/BulkAnnotationResult'
          type: array
          title: Results
      type: object
      title: BulkAnnotationsResponse
      description: Response for bulk annotation operations.
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkAnnotationCreate:
      properties:
        document_id:
          type: string
          title: Document Id
          description: Document to annotate.
        collection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection Id
        label:
          type: string
          maxLength: 100
          minLength: 1
          title: Label
        confidence:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Confidence
        reasoning:
          anyOf:
            - type: string
              maxLength: 5000
            - type: 'null'
          title: Reasoning
        payload:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Payload
        retriever_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Retriever Id
        execution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Id
        stage_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Stage Name
      type: object
      required:
        - document_id
        - label
      title: BulkAnnotationCreate
      description: Single create within a bulk request.
    BulkAnnotationUpdate:
      properties:
        annotation_id:
          type: string
          title: Annotation Id
          description: Annotation to update.
        label:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Label
        confidence:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Confidence
        reasoning:
          anyOf:
            - type: string
              maxLength: 5000
            - type: 'null'
          title: Reasoning
        payload:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Payload
      type: object
      required:
        - annotation_id
      title: BulkAnnotationUpdate
      description: Single update within a bulk request.
    BulkAnnotationResult:
      properties:
        annotation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Annotation Id
          description: Annotation ID (set for create/update).
        operation:
          type: string
          title: Operation
          description: 'Operation type: create, update, or delete.'
        success:
          type: boolean
          title: Success
          description: Whether the operation succeeded.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if failed.
      type: object
      required:
        - operation
        - success
      title: BulkAnnotationResult
      description: Result of a single operation within a bulk request.
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    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

````