Append session messages
DeprecatedAppends user/assistant messages to a session, in order, creating the session if this is its first write, and queues memory formation over them. The returned ingestion is the receipt to poll. Tool-call turns are recorded separately by the MCP layer and are not accepted here.
New ids are limited to [A-Za-z0-9][A-Za-z0-9.~:-]{0,127}, but you can keep referring to previous ids as they were defined.
Deprecated: use POST …/ingestions/sessions, which accepts the same messages under the session's id.
Authorization
Bearer writeEach operation lists the OAuth scope (read or write) it requires.
In: header
Scope: write
Path Parameters
ID of the patient
^[A-Za-z0-9._~:-]{1,128}$Unique session ID returned when the session was created.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Messages to append to an open session.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/patients/string/sessions/string/messages" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "user", "content": "string" } ] }'{ "ok": true, "messageCount": 0, "ingestion": { "ingestionId": "string", "source": "fhir/r4", "mimeType": "string", "receivedAt": "string", "status": "pending", "staged": { "facts": 0, "events": 0, "narratives": 0, "messages": 0 }, "intake": [ { "unit": "resource", "received": 0, "entries": [ { "kind": "string", "label": "string", "count": 1, "outcome": "structured", "reason": "unsupported" } ], "sessionId": "string" } ], "startedAt": "string", "completedAt": "string", "failure": { "code": "string", "message": "string" } }}