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

# Obtener conversación

> Obtiene una conversación completa con todos sus mensajes.

## Path Parameters

<ParamField path="id" type="string" required>
  ID de la conversación (ej. `conv_abc123`).
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "conv_abc123",
    "patientId": "pat_xyz789",
    "context": "Seguimiento post-operatorio. Preguntar por dolor, movilidad y estado general.",
    "language": "es",
    "status": "ended",
    "messages": [
      {
        "id": "msg_001",
        "role": "assistant",
        "content": "Hola María, soy LINA, tu asistente de salud. ¿Cómo te encuentras hoy?",
        "createdAt": "2026-05-14T10:00:00Z"
      },
      {
        "id": "msg_002",
        "role": "patient",
        "content": "Me duele un poco la rodilla cuando camino",
        "createdAt": "2026-05-14T10:01:30Z"
      },
      {
        "id": "msg_003",
        "role": "assistant",
        "content": "Entiendo, María. ¿Podrías describir el tipo de dolor? ¿Es un dolor agudo, punzante o más bien una molestia constante?",
        "createdAt": "2026-05-14T10:01:32Z"
      },
      {
        "id": "msg_004",
        "role": "patient",
        "content": "Es más bien una molestia constante, no muy fuerte",
        "createdAt": "2026-05-14T10:02:15Z"
      },
      {
        "id": "msg_005",
        "role": "assistant",
        "content": "Gracias por la información. Una molestia constante y leve es normal en esta fase de recuperación. ¿Está tomando la medicación que le recetó el Dr. García?",
        "createdAt": "2026-05-14T10:02:17Z"
      }
    ],
    "summary": "Paciente refiere dolor leve y constante en rodilla al caminar. Compatible con recuperación normal post-operatoria. Verificar adherencia a medicación.",
    "creditsConsumed": 12,
    "createdAt": "2026-05-14T10:00:00Z",
    "endedAt": "2026-05-14T10:05:00Z"
  }
  ```
</ResponseExample>

<ResponseField name="messages" type="array">
  Lista completa de mensajes ordenados cronológicamente.
</ResponseField>

<ResponseField name="summary" type="string">
  Resumen generado por IA al finalizar la conversación. Solo disponible para conversaciones con estado `ended`.
</ResponseField>

<ResponseField name="creditsConsumed" type="integer">
  Total de créditos consumidos en la conversación (10 de inicio + 1 por cada mensaje del paciente).
</ResponseField>

<ResponseField name="endedAt" type="string">
  Fecha y hora de finalización de la conversación, si aplica.
</ResponseField>


## OpenAPI

````yaml openapi.yml GET /conversations/{id}
openapi: 3.1.0
info:
  title: LINA Healthcare Platform API
  version: 1.0.0
  description: |
    API de integración para la plataforma LINA Healthcare.
    Todas las rutas requieren un token JWT obtenido intercambiando una API Key.
servers:
  - url: https://api.linahealthcareplatform.com/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /conversations/{id}:
    get:
      tags:
        - Conversaciones
      summary: Obtener conversación
      operationId: getConversation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Conversación con mensajes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
components:
  schemas:
    Conversation:
      type: object
      properties:
        id:
          type: string
        patientId:
          type: string
        status:
          type: string
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              role:
                type: string
              content:
                type: string
              createdAt:
                type: string
                format: date-time
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Token JWT obtenido via POST /auth/token

````