> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create session annotations



## OpenAPI

````yaml post /v1/session_annotations
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/session_annotations:
    post:
      tags:
        - sessions
      summary: Create session annotations
      operationId: annotateSessions
      parameters:
        - name: sync
          in: query
          required: false
          schema:
            type: boolean
            description: If true, fulfill request synchronously.
            default: false
            title: Sync
          description: If true, fulfill request synchronously.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotateSessionsRequestBody'
      responses:
        '200':
          description: Session annotations inserted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotateSessionsResponseBody'
        '403':
          content:
            text/plain:
              schema:
                type: string
          description: Forbidden
        '404':
          description: Session not found
          content:
            text/plain:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AnnotateSessionsRequestBody:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SessionAnnotationData'
          type: array
          title: Data
      type: object
      required:
        - data
      title: AnnotateSessionsRequestBody
    AnnotateSessionsResponseBody:
      properties:
        data:
          items:
            $ref: '#/components/schemas/InsertedSessionAnnotation'
          type: array
          title: Data
      type: object
      required:
        - data
      title: AnnotateSessionsResponseBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionAnnotationData:
      properties:
        name:
          type: string
          title: Name
          description: The name of the annotation
        annotator_kind:
          type: string
          enum:
            - LLM
            - CODE
            - HUMAN
          title: Annotator Kind
          description: The kind of annotator used for the annotation
        result:
          anyOf:
            - $ref: '#/components/schemas/AnnotationResult'
            - type: 'null'
          description: The result of the annotation
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Metadata for the annotation
        identifier:
          type: string
          title: Identifier
          description: >-
            The identifier of the annotation. If provided, the annotation will
            be updated if it already exists.
          default: ''
        session_id:
          type: string
          title: Session Id
          description: Session ID
      type: object
      required:
        - name
        - annotator_kind
        - session_id
      title: SessionAnnotationData
    InsertedSessionAnnotation:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the inserted session annotation
      type: object
      required:
        - id
      title: InsertedSessionAnnotation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AnnotationResult:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: The label assigned by the annotation
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
          description: The score assigned by the annotation
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
          description: Explanation of the annotation result
      type: object
      title: AnnotationResult

````