Ingest sessions
Technical previewSubmits one or more conversation transcripts. Each transcript is stored as a session — under the sessionId it declares, or a generated one — and the patient's memories are formed from it as ingestion proceeds.
The response is a receipt: ingestion continues after it is returned, so poll the ingestion to follow it. intake comes back index-aligned with the sessions you sent, each item naming the session its transcript was stored under.
Resending a session under the same sessionId is safe: messages already stored are recognised and not staged again, and turns added at the end are appended. A transcript without a sessionId always opens a new session. A transcript that edits, removes or reorders stored turns is refused. If any transcript is refused, the whole request is rejected and nothing is stored.
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}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
One or more sessions to import.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/patients/string/ingestions/sessions" \ -H "Content-Type: application/json" \ -d '{ "sessions": [ { "messages": [ { "role": "user", "content": "string" } ] } ] }'{ "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" }}