Skip to main content
POST
/
auth
/
api-keys
Generar API Key
curl --request POST \
  --url https://api.lina.health/v1/auth/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "permissions": [
    "<string>"
  ]
}
'
{
  "id": "key_abc123",
  "name": "Backend producción",
  "key": "lina_sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "permissions": ["patients:read", "patients:write", "forms:read"],
  "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.

La API key completa solo se muestra una vez en la respuesta. Guárdala en un lugar seguro.

Body

name
string
required
Nombre descriptivo para identificar la API key (ej. “Backend producción”).
permissions
string[]
Lista de permisos asignados a la key. Si se omite, se asignan todos los permisos.Valores permitidos: patients:read, patients:write, forms:read, forms:write, schedules:read, schedules:write, calls:read, calls:write, conversations:read, conversations:write, credits:read, webhooks:read, webhooks:write.
{
  "id": "key_abc123",
  "name": "Backend producción",
  "key": "lina_sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "permissions": ["patients:read", "patients:write", "forms:read"],
  "createdAt": "2026-05-14T10:00:00Z"
}
id
string
Identificador único de la API key.
name
string
Nombre descriptivo de la key.
key
string
La API key completa. Solo se muestra en esta respuesta. Úsala para obtener tokens de acceso.
permissions
string[]
Lista de permisos asignados.
createdAt
string
Fecha de creación en formato ISO 8601.