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

# Track a conversation turn

> A turn in a conversation.



## OpenAPI

````yaml POST /bc/v1/events/event/conversation-turn
openapi: 3.0.0
info:
  title: Mindlytics API
  version: 1.0.0
servers:
  - url: https://app.mindlytics.ai
security:
  - APIKey: []
    APPId: []
paths:
  /bc/v1/events/event/conversation-turn:
    post:
      tags:
        - Events
      summary: Conversation turn
      description: A turn in a conversation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
                  description: A unique session ID generated by caller
                timestamp:
                  type: string
                  description: >-
                    The timestamp of the event, defaults to "now" if not
                    specified.
                user_id:
                  type: string
                  description: The unique ID of the user
                device_id:
                  type: string
                  description: The ID of the device, if applicable
                type:
                  type: string
                  enum:
                    - track
                  description: The event that tracks an arbitray event
                event:
                  type: string
                  enum:
                    - Conversation Turn
                  description: The event that represents a turn in a conversation
                conversation_id:
                  type: string
                  description: The ID of the conversation
                properties:
                  type: object
                  properties:
                    user:
                      type: string
                    assistant:
                      type: string
                    assistant_id:
                      type: string
                      description: The ID of the assistant, if applicable
                    model:
                      type: string
                      description: The model name
                    prompt_tokens:
                      type: number
                      description: The number of tokens in the prompt
                    completion_tokens:
                      type: number
                      description: The number of tokens in the completion
                    cost:
                      type: number
                      description: The cost of the event
                  required:
                    - user
                    - assistant
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Properties of a turn event
              required:
                - session_id
                - type
                - event
                - conversation_id
                - properties
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - start_session
                        - end_session
                        - identify
                        - alias
                        - track
                      title: Event Type
                      description: The type of event being sent.
                  required:
                    - type
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  title: Other properties
                  description: Propties that depend on the event type.
                title: Events
                description: >-
                  The events that were generated by the Mindlytics service as a
                  result of this event.
components:
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: Authorization
      description: API Key for your organization
    APPId:
      type: apiKey
      in: header
      name: X-App-ID
      description: Project ID

````