---
title: "Create Annotation"
method: POST
path: "/preview/annotations/"
tags: ["Evals"]
---

# Create Annotation

`POST /preview/annotations/`

## Request body

- AnnotationCreateRequest
  - `annotation` AnnotationCreate, required
    - `kind` 'custom' | 'human' | 'auto'
    - `source` 'web' | 'sdk' | 'api'
    - `data` object, required
    - `metadata` object, nullable
    - `references` AnnotationReferencesInput, required
      - `evaluator` AnnotationReferenceInput, required
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
        - `attributes` object
      - `testset` AnnotationReferenceInput
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
        - `attributes` object
      - `testcase` AnnotationReferenceInput
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
        - `attributes` object
    - `links` object, required

## Response `200`

Successful Response

- AnnotationResponse
  - `annotation` Annotation
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `span_id` string, required
    - `trace_id` string, required
    - `kind` 'custom' | 'human' | 'auto'
    - `source` 'web' | 'sdk' | 'api'
    - `data` object, required
    - `metadata` object, nullable
    - `references` AnnotationReferencesOutput, required
      - `evaluator` AnnotationReferenceOutput, required
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
      - `testset` AnnotationReferenceOutput
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
      - `testcase` AnnotationReferenceOutput
        - `id` string, uuid, nullable
        - `slug` string, nullable
        - `version` string, nullable
    - `links` object, required

## Other responses

- `422` — Validation Error

## Changes

- **2025-06-27** `e3e84db47198` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/preview/annotations/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/e3e84db47198/schema)
