scribe:write to change context; scribe:read to retrieve it.
Add background text
Setbackground_context when creating a session, or update it with
PATCH /sessions/{session_id}:
Upload a report
POST /sessions/{session_id}/context-documents accepts multipart form data.
Use the field name files for each file and an Idempotency-Key for the upload.
--form 'files=@...'; do not set the multipart boundary yourself.
The
201 response contains an items array. Each item identifies an attachment:
id, name, mime_type, size_bytes, status, and index_status.
The upload response does not mean extraction and indexing have finished.
Wait for usable context
status: "ready" and
index_status: "ready" on each required attachment before generating. These fields
also show extraction or indexing failures.
Remove an attachment
DELETE /sessions/{session_id}/context-documents
{"deleted": true}. This detaches the files from the session; it
does not delete the clinician’s library copy or rewrite existing generated notes.
Link previous consultations
UsePUT /sessions/{session_id}/context/sessions to choose previous consultations
whose notes provide context for future generation:
422 CONTEXT_PATIENT_MISMATCH; a resource outside the
grant returns 404; a source without a completed note returns
409 CONSULT_NOTE_REQUIRED. Updates are atomic: an invalid source leaves the
previous links in place.
Continue with consult notes or documents.