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

# Create review annotation

> Create or update the saved annotation for a simulation output, metric, and
reviewer. Project creation does not create these annotation records.
Use the returned `review_annotation.id` with PATCH for later partial updates.
Repeating POST replaces the saved answer fields, including clearing omitted
optional answer fields.
A personal API key can write only for its own user unless it manages the
supplied `project_id`; a write for another reviewer returns HTTP 403.




## OpenAPI

````yaml /api-reference/v1/reviews-v1.yaml post /review-annotations
openapi: 3.0.3
info:
  title: Coval Reviews API
  version: 1.0.0
  description: >
    Manage human review annotations and projects for AI evaluation quality
    assurance.


    **Annotations** are saved review data for a simulation output, metric, and

    reviewer, including ground-truth values and notes.


    **Projects** organize review assignments by linking simulations, metrics,
    and

    assignees. Creating a project defines assignments for the configured

    (simulation, metric, assignee) combinations, not saved annotations.

    Submit review data through the annotation API, then use the returned
    annotation

    ID for later updates.


    Key concepts:

    - Review assignments and saved annotations are separate resources

    - Annotation completion depends on saved ground truth and applicable project
    rules

    - Resource naming: `review-annotations/{id}`, `review-projects/{id}`
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Review Annotations
    description: Annotation CRUD operations
  - name: Review Projects
    description: Project CRUD operations
paths:
  /review-annotations:
    post:
      tags:
        - Review Annotations
      summary: Create review annotation
      description: >
        Create or update the saved annotation for a simulation output, metric,
        and

        reviewer. Project creation does not create these annotation records.

        Use the returned `review_annotation.id` with PATCH for later partial
        updates.

        Repeating POST replaces the saved answer fields, including clearing
        omitted

        optional answer fields.

        A personal API key can write only for its own user unless it manages the

        supplied `project_id`; a write for another reviewer returns HTTP 403.
      operationId: createReviewAnnotation
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            type: string
          description: >
            Optional project ID. The simulation output, metric, and reviewer
            must

            match an assignment in this project. Applies project rules to the

            returned completion status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReviewAnnotationRequest'
            examples:
              basic:
                summary: Create a basic annotation
                value:
                  simulation_output_id: sim-output-abc123
                  metric_id: metric-accuracy-001
                  assignee: reviewer@company.com
              with_ground_truth:
                summary: Save ground truth and reviewer notes
                value:
                  simulation_output_id: sim-output-abc123
                  metric_id: metric-accuracy-001
                  assignee: reviewer@company.com
                  ground_truth_float_value: 0.95
                  reviewer_notes: Verified correct response
      responses:
        '201':
          description: Annotation created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateReviewAnnotationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            CONFLICT. The conversation is held by another reviewer's batch.
            Retry after the hold ends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          $ref: '#/components/responses/MetricConfigurationInvalid'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateReviewAnnotationRequest:
      type: object
      required:
        - metric_id
        - simulation_output_id
      properties:
        simulation_output_id:
          type: string
          minLength: 1
          description: Simulation output ID to link
        metric_id:
          type: string
          minLength: 1
          description: Metric ID to link
        assignee_user_id:
          type: string
          nullable: true
          minLength: 26
          maxLength: 26
          description: >-
            Optional Coval reviewer User ULID, validated against organization
            membership. Null preserves email-based writes or uses authenticated
            self-review.
        assignee:
          type: string
          minLength: 1
          nullable: true
          description: >-
            Legacy reviewer email; accepted without a matching user. New answers
            receive a User ID when safely resolved.
        ground_truth_float_value:
          type: number
          format: float
          nullable: true
          description: >-
            Optional ground truth numeric value; completion also depends on
            applicable project rules
        ground_truth_string_value:
          type: string
          nullable: true
          description: >-
            Optional ground truth string value; completion also depends on
            applicable project rules
        ground_truth_subvalues_by_timestamp:
          type: array
          nullable: true
          items:
            type: object
          description: Optional ground truth subvalues
        reviewer_notes:
          type: string
          nullable: true
          description: Optional reviewer notes
        annotations:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              nullable: true
              enum:
                - null
          default: null
        ground_truth_json:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              nullable: true
              enum:
                - null
          default: null
        ground_truth_set_value:
          type: array
          nullable: true
          items:
            type: string
    CreateReviewAnnotationResponse:
      type: object
      required:
        - review_annotation
      properties:
        review_annotation:
          $ref: '#/components/schemas/ReviewAnnotationResource'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameter
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: Field that caused the error
                  description:
                    type: string
                    description: Detailed error description
    ReviewAnnotationResource:
      type: object
      description: Saved review data for a simulation output, metric, and reviewer.
      required:
        - assignee
        - create_time
        - simulation_output_id
        - priority
        - id
        - status
        - completion_status
        - metric_id
        - update_time
        - name
      properties:
        name:
          type: string
          description: 'Resource name: review-annotations/{id}'
          example: review-annotations/abc123def456ghi789jklm
        id:
          type: string
          description: >-
            Saved annotation ID used for GET, PATCH, and DELETE; not a project
            assignment ID
          example: abc123def456ghi789jklm
        simulation_output_id:
          type: string
          description: Linked simulation output ID
        metric_id:
          type: string
          description: Linked metric ID
        assignee_user_id:
          type: string
          nullable: true
          description: >-
            Canonical Coval reviewer User ULID; null means reviewer attribution
            is unresolved.
        assignee:
          type: string
          description: Email of the assigned reviewer
        ground_truth_float_value:
          type: number
          format: float
          nullable: true
          description: Reviewer-provided ground truth numeric value
        ground_truth_string_value:
          type: string
          nullable: true
          description: Reviewer-provided ground truth string value
        ground_truth_subvalues_by_timestamp:
          type: array
          nullable: true
          description: Reviewer-provided ground truth subvalues keyed by timestamp
          items:
            type: object
        reviewer_notes:
          type: string
          nullable: true
          description: Free-text reviewer notes
        status:
          $ref: '#/components/schemas/AnnotationStatus'
        completion_status:
          $ref: '#/components/schemas/CompletionStatus'
        priority:
          $ref: '#/components/schemas/AnnotationPriority'
        create_time:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601)
        update_time:
          type: string
          format: date-time
          description: Last update timestamp (ISO 8601)
        annotations:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              nullable: true
              enum:
                - null
          default: null
        canonical_annotation_id:
          type: string
          nullable: true
        ground_truth_json:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              nullable: true
              enum:
                - null
          default: null
        ground_truth_set_value:
          type: array
          nullable: true
          items:
            type: string
        project_annotation_id:
          type: string
          nullable: true
    AnnotationStatus:
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
      description: 'Annotation lifecycle status: ACTIVE (default) or ARCHIVED'
    CompletionStatus:
      type: string
      enum:
        - PENDING
        - COMPLETED
      description: 'Annotation completion status: PENDING or COMPLETED'
    AnnotationPriority:
      type: string
      enum:
        - PRIORITY_PRIMARY
        - PRIORITY_STANDARD
      default: PRIORITY_STANDARD
      description: Annotation priority level
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_ARGUMENT
              message: Invalid request body
              details:
                - field: simulation_output_id
                  description: simulation_output_id is required
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: PERMISSION_DENIED
              message: Insufficient permissions
              details:
                - field: permissions
                  description: >-
                    The API key does not include the required reviews
                    permission.
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Resource not found
              details:
                - field: annotation_id
                  description: Annotation not found or not accessible by your organization
    MetricConfigurationInvalid:
      description: >-
        FAILED_PRECONDITION. Metric configuration requires repair. Contact Coval
        support before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.