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

> Get a chat session — Retrieves details of a specific chat session by its ID. Use when orchestrating conversations from code — creating sessions, sending messages, or listing…

# Get a chat session



## OpenAPI

````yaml get /chat/sessions/{session_id}
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /chat/sessions/{session_id}:
    get:
      summary: Get a chat session
      description: Retrieves details of a specific chat session by its ID.
      operationId: getChatSession
      parameters:
        - schema:
            type: string
          in: path
          name: session_id
          required: true
          description: The unique identifier of the chat session
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatSessionOutput'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    GetChatSessionOutput:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/GetChatSessionOutput'
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        status:
          type: string
          enum:
            - open
            - closed_resolved
            - closed_unresolved
        ai_closure_type:
          anyOf:
            - type: string
              enum:
                - assumed_resolved
                - handed_off
                - resolved
            - type: 'null'
        sentiment:
          anyOf:
            - type: string
              enum:
                - angry
                - happy
                - neutral
            - type: 'null'
        channel:
          type: object
          properties:
            type:
              $ref: '#/components/schemas/SessionChannel'
          required:
            - type
          additionalProperties: false
        contact:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            email:
              anyOf:
                - type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                - type: 'null'
            phone_number:
              anyOf:
                - type: string
                - type: 'null'
            name:
              anyOf:
                - type: string
                - type: 'null'
            custom_data:
              anyOf:
                - type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                - type: 'null'
            created_at:
              type: string
              description: ISO 8601 timestamp of when the contact was created
            updated_at:
              type: string
              description: ISO 8601 timestamp of when the contact was last updated
            non_verified_name:
              anyOf:
                - type: string
                - type: 'null'
            non_verified_email:
              anyOf:
                - type: string
                - type: 'null'
            non_verified_custom_data:
              anyOf:
                - type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                - type: 'null'
          required:
            - id
            - email
            - phone_number
            - name
            - custom_data
            - created_at
            - updated_at
            - non_verified_name
            - non_verified_email
            - non_verified_custom_data
          additionalProperties: false
        language:
          type: string
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
        custom_data:
          description: Session-level custom data stored on the chat session.
          type: object
          propertyNames:
            type: string
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
        team:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            name:
              type: string
            description:
              type: string
          required:
            - id
            - name
          additionalProperties: false
        handoff:
          type: object
          properties:
            sentiment:
              type: string
              enum:
                - angry
                - happy
                - neutral
            summary:
              type: string
          required:
            - summary
          additionalProperties: false
        ticketing_system:
          type: object
          properties:
            name:
              type: string
              enum:
                - dynamics365
                - freshchat
                - freshdesk
                - freshdesk_ticketing
                - front
                - gorgias
                - hubspot
                - infobip
                - intercom
                - open
                - salesforce
                - salesforce_v2
                - twilio_flex
                - zendesk
                - zendesk_v2
            external_id:
              type: string
            id_type:
              type: string
              enum:
                - conversation_id
                - ticket_id
                - case_id
                - conversation_sid
          required:
            - name
            - external_id
            - id_type
          additionalProperties: false
        ticket_number:
          type: number
        assist_mode:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - status
        - ai_closure_type
        - sentiment
        - channel
        - ticket_number
        - assist_mode
        - created_at
        - updated_at
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
    SessionChannel:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SessionChannel'
      type: string
      enum:
        - web
        - email
        - phone_voice
        - slack
        - sms
        - whatsapp
        - instagram
        - messenger
        - api
        - web_voice
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````