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

# Get the Captain session behind a message

> Returns the Captain agent session that produced the given message, with the documents it cited, the approved FAQs it used and the titles of the scenarios it ran. Answers 404 when the message was not produced by Captain.



## OpenAPI

````yaml /openapi/application.json get /api/v1/accounts/{account_id}/captain/agent_sessions/{id}
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /api/v1/accounts/{account_id}/captain/agent_sessions/{id}:
    parameters:
      - $ref: '#/components/parameters/account_id'
        schema:
          type: string
        example: sample
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Id of the message the Captain reply was delivered as.
        example: 1
    get:
      tags:
        - Captain
      summary: Get the Captain session behind a message
      description: >-
        Returns the Captain agent session that produced the given message, with
        the documents it cited, the approved FAQs it used and the titles of the
        scenarios it ran. Answers 404 when the message was not produced by
        Captain.
      operationId: get-captain-agent-session
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                id: 1
                name: Sample Agent Session
                status: active
                created_at: '2026-05-20T12:00:00Z'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '404':
          description: The message has no Captain session.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Resource not found
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de acesso do usuário (Perfil → Token de acesso). Dá acesso
        conforme o papel do usuário e age em nome dele.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.