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

# Detail Session

> Retrieves the paginated chat history of a specific session for an agent.



## OpenAPI

````yaml GET /session/chat/{agent_id}/{session_id}
openapi: 3.0.1
info:
  title: OpenAPI Soca AI
  description: An API for sending messages and retrieving responses from the AI Agent.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.soca.ai/v1
security:
  - private_key: []
paths:
  /session/chat/{agent_id}/{session_id}:
    get:
      description: Retrieves the paginated chat history of a specific session for an agent.
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The unique identifier of a Soca AI agent created in the Studio.
          schema:
            type: string
        - name: session_id
          in: path
          required: true
          description: Identifier of the specific session.
          schema:
            type: string
      responses:
        '200':
          description: Returns the chat history for the specified session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatHistoryResponse'
        '400':
          description: Invalid agent_id format or invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Invalid or missing private_key in the header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
components:
  schemas:
    ChatHistoryResponse:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/ChatItem'
    Error400:
      type: object
      required:
        - error
        - message
      properties:
        status:
          type: boolean
          description: Error code.
        message:
          type: string
          description: Error message description.
    Error401:
      type: object
      required:
        - error
        - message
      properties:
        status:
          type: boolean
          description: Error code.
        message:
          type: string
          description: Error message description.
    ChatItem:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        question:
          type: string
        answers:
          type: array
          items:
            $ref: '#/components/schemas/AnswerItem'
        files:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AnswerItem:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        description:
          type: string
        doc_source:
          type: array
          items:
            type: string
        chart:
          type: array
          items:
            type: object
        files:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    private_key:
      type: apiKey
      in: header
      name: private_key

````