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

# Start Chat Session

> **Legacy — will be deprecated soon. Use the [Chat v1](/api-reference/endpoint/chat/create_session) endpoints (`POST /v1/chat/session`) for new integrations.**

Opens a new chat session with the specified agent and returns a `session_id` used for all subsequent messages.



## OpenAPI

````yaml POST /chat_sessions
openapi: 3.1.0
info:
  title: OSVI AI API
  description: REST API for the OSVI AI voice and chat platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.osvi.ai
security:
  - ApiToken: []
paths:
  /chat_sessions:
    post:
      summary: Start a chat session
      description: >-
        **Legacy — will be deprecated soon. Use the [Chat
        v1](/api-reference/endpoint/chat/create_session) endpoints (`POST
        /v1/chat/session`) for new integrations.**


        Opens a new chat session with the specified agent and returns a
        `session_id` used for all subsequent messages.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agent_uuid
              properties:
                agent_uuid:
                  type: string
                  description: Unique identifier of the OSVI agent to chat with.
                  example: agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og
                metadata:
                  type: object
                  description: Optional session metadata made available to the agent.
                  properties:
                    person_name:
                      type: string
                      example: Jane Smith
      responses:
        '200':
          description: Session started successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        description: >-
                          UUID identifying this session. Pass this as
                          `chat_session_id` in all subsequent requests.
                        example: 4718a326-417b-4dda-90d0-21fd65a11cb8
                      agent_name:
                        type: string
                        example: Support Agent
                      started_at:
                        type: string
                        format: date-time
                        example: '2025-12-31T11:40:25.690486'
                      welcome_message:
                        type: string
                        description: Opening message from the agent.
                        example: Hi! How can I help you today?
        '401':
          description: Invalid or missing API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatErrorUnauthorized'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnprocessable'
      deprecated: true
components:
  schemas:
    ChatErrorUnauthorized:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Invalid API token
    ErrorUnprocessable:
      type: object
      properties:
        success:
          type: boolean
          example: false
        errors:
          type: array
          items:
            type: string
          example:
            - agent_uuid is required
            - phone_number is invalid
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: API-Token
      description: >-
        16-character API token associated with your OSVI account. Find it in
        your dashboard under Settings → API.

````