The Context Engine Studio is now open source.  View on GitHub →
Clinia
Sessions

Upsert a session

Deprecated
PUT
/v1/patients/{patientId}/sessions/{sessionId}

Idempotently opens a session under a caller-provided id: creates it if new, or returns the existing session unchanged. Sessions track interaction context across multiple MCP tool calls within a single agent run.

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: a session no longer needs opening. Its first write — appending messages, a tool call's session_id, or POST …/ingestions/sessions — creates it.

Authorization

Bearer write
AuthorizationBearer <token>

Each operation lists the OAuth scope (read or write) it requires.

In: header

Scope: write

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

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/patients/string/sessions/string"
{  "sessionId": "string",  "patientId": "string",  "createdAt": "string"}