Skip to main content
POST
/
conversations
Iniciar conversación
curl --request POST \
  --url https://api.lina.health/v1/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "patientId": "<string>",
  "context": "<string>",
  "language": "<string>"
}
'
{
  "id": "conv_abc123",
  "patientId": "pat_xyz789",
  "context": "Seguimiento post-operatorio. Preguntar por dolor, movilidad y estado general.",
  "language": "es",
  "status": "active",
  "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"
    }
  ],
  "creditsConsumed": 10,
  "createdAt": "2026-05-14T10:00:00Z"
}

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.

Body

patientId
string
required
ID del paciente con quien iniciar la conversación.
context
string
required
Contexto e instrucciones para la IA. Define el propósito de la conversación, tono y límites.
language
string
default:"es"
Idioma de la conversación. Valores: es (español), en (inglés), ca (catalán).
Iniciar una conversación consume 10 créditos. Cada mensaje posterior consume 1 crédito.
{
  "id": "conv_abc123",
  "patientId": "pat_xyz789",
  "context": "Seguimiento post-operatorio. Preguntar por dolor, movilidad y estado general.",
  "language": "es",
  "status": "active",
  "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"
    }
  ],
  "creditsConsumed": 10,
  "createdAt": "2026-05-14T10:00:00Z"
}
id
string
Identificador único de la conversación con prefijo conv_.
status
string
Estado de la conversación: active o ended.
messages
array
Mensajes de la conversación. Al inicio contiene el primer mensaje de bienvenida de la IA.