Clinia
API ReferenceREST API

Append session messages

POST
/v1/patients/{patientId}/sessions/{sessionId}/messages

Appends user/assistant messages to an open session's transcript, in order. The session stays open. Tool-call turns are recorded separately by the MCP layer and are not accepted here.

Path Parameters

patientId*string

ID of the patient

Match^[A-Za-z0-9._-]{1,128}$
sessionId*string

Unique session ID returned when the session was created.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/patients/patient-123/sessions/session-456/messages" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "role": "user",        "content": "string"      }    ]  }'
{
  "ok": true,
  "messageCount": 0
}
{
  "code": 1,
  "type": "ALREADY_EXISTS",
  "message": "string"
}