---
title: "Create session annotations"
method: POST
path: "/v1/session_annotations"
tags: ["sessions"]
---

# Create session annotations

`POST /v1/session_annotations`

## Query parameters

- `sync` boolean — If true, fulfill request synchronously.

## Request body

- AnnotateSessionsRequestBody
  - `data` SessionAnnotationData[], required
    - `name` string, required — The name of the annotation
    - `annotator_kind` 'LLM' | 'CODE' | 'HUMAN', required — The kind of annotator used for the annotation
    - `result` AnnotationResult
      - `label` string, nullable — The label assigned by the annotation
      - `score` number, nullable — The score assigned by the annotation
      - `explanation` string, nullable — Explanation of the annotation result
    - `metadata` object, nullable — Metadata for the annotation
    - `identifier` string — The identifier of the annotation. If provided, the annotation will be updated if it already exists.
    - `session_id` string, required — Session ID

## Response `200`

Session annotations inserted successfully

- AnnotateSessionsResponseBody
  - `data` InsertedSessionAnnotation[], required
    - `id` string, required — The ID of the inserted session annotation

## Other responses

- `403` — Forbidden
- `404` — Session not found
- `422` — Validation Error

---

[API](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-phoenix-rest-api/versions/a14d8ad6f708/schema)
