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

# Retrieve a chat session — full transcript and lifecycle status.



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json get /api/v1/chats/{id}
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/chats/{id}:
    get:
      tags:
        - Chats
      summary: Retrieve a chat session — full transcript and lifecycle status.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Session found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatSessionDto'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: No session with this id exists for the caller's organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    ChatSessionDto:
      type: object
      properties:
        id:
          type: string
          description: Session identifier.
          format: uuid
        agent_id:
          type: string
          description: Agent driving this session. Frozen at open.
          nullable: true
        channel:
          type: string
          description: Channel name (`web`, `twilio_sms`, …).
          nullable: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageDto'
          description: Full conversation transcript so far, in send order.
          nullable: true
        created_time:
          type: string
          description: Session creation timestamp (UTC).
          format: date-time
        last_activity:
          type: string
          description: >-
            Most recent activity timestamp (inbound, outbound or assistant
            turn).
          format: date-time
        ttl_seconds:
          type: integer
          description: Inactivity timeout in seconds; null when no TTL applies.
          format: int32
          nullable: true
        is_final:
          type: boolean
          description: True once the session has terminated.
        status:
          type: string
          description: >-
            Status mirror of
            DashaAI.BlackBox.AgentAPI.TextChat.Dtos.Chats.ChatSessionDto.IsFinal
            for list-endpoint filtering (`active` /

            `final`).
          nullable: true
        final_reason:
          type: string
          description: Reason for finalisation (`ttl`, `user_end`, `agent_finish`, …).
          nullable: true
      additionalProperties: false
      description: >-
        Public projection of a chat session — what callers see via `GET
        /api/v1/chats/{id}`

        and the list endpoint. Deliberately omits the orchestration `State`
        blob, the

        `ExternalIdHash`, and the worker hot-flags; those are server-internal.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ChatMessageDto:
      type: object
      properties:
        role:
          type: string
          description: One of "user", "assistant", "system".
          nullable: true
        content:
          type: string
          description: >-
            Plain-text message content. Null when the assistant message only
            contains tool calls.
          nullable: true
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ChatToolCallDto'
          description: >-
            Tool calls produced by the assistant this turn, bundled with their
            responses.
          nullable: true
        time:
          type: string
          description: >-
            Real wall-clock time of the message. The server stamps the messages
            it produces and

            echoes back any client-supplied value; it is used verbatim for the
            call transcript /

            post-call analysis instead of a synthesized clock. One timestamp per
            chat message is

            enough — chat messages are point-in-time events, unlike voice
            utterances. Optional.
          format: date-time
          nullable: true
      additionalProperties: false
      description: >-
        Wire-format text-chat message. Supports user / assistant / system roles.

        Tool invocations are bundled — a single assistant message carries the
        tool call(s)

        alongside their executed response(s) via
        DashaAI.BlackBox.AgentAPI.TextChat.Dtos.ChatMessageDto.ToolCalls.
    ChatToolCallDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Tool call identifier propagated through the OpenAI round-trip.
            Required.
          nullable: true
        name:
          type: string
          description: >-
            Tool name as registered with the agent (built-in, agent-defined
            function, or MCP).
          nullable: true
        arguments:
          description: >-
            Tool arguments emitted by the LLM, as a JSON object. May be omitted
            for tools with no parameters.
        response:
          description: >-
            Tool response. Set after the server executes the tool. Null while
            the request is still in flight

            (only happens internally — wire-format messages from the client
            always include the response).
          nullable: true
      additionalProperties: false
      description: >-
        Combined tool call: the LLM-generated request and the executed response
        in a single object.

        Wire-format choice — internally the orchestrator translates to OpenAI's
        split assistant/tool format.
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````