Create a session
POST /v1/sessions
Creates a clinical-summarization session. Powers Flows 2, 3, and 4 depending on which fields you pass:
- Flow 2 (patient-link with full UX): pass
template_codeorcustom_questions[]— patient gets a hosted URL with iterative Q&A + uploads + voice - Flow 3 (direct mode): pass
patient,document_ids[], and completecustom_questions[](with answers) — your backend has the data, no patient UI needed - Flow 4 (LLM-driven dynamic): omit
template_codeandcustom_questions[]— LLM generates each next question based on prior answers
Authorizations
Parameters
Header Parameters
Optional UUID to deduplicate retries. 24h TTL.
Request Body required
object
Server-side aliases:
emergency-summary → emergency,
pre-anc-visit → pre-consult.
obstetricsVisit purpose (e.g. ‘second-trimester checkup’); biases LLM
ISO 639-1 code; supported: en, hi, te, mr
enPin a specific template; omit for catalog auto-resolve or LLM dynamic
Pre-defined questions; if all have answer, this is Flow 3 direct mode
object
Structured patient data for Flow 3 direct mode
object
Free-form key-value pairs; common keys: source, user_id, urgency, visit_type
object
Pre-detected red flags (Flow 3 emergency)
object
object
{ "type": "pre-consult", "specialty": "obstetrics", "initiator": "patient", "template_code": "anc_first_visit", "patient_id": "c2c5...", "metadata": { "source": "preg.care" }}Responses
201
Session created
object
Opaque public token used in patient-facing URLs
Server-side aliases:
emergency-summary → emergency,
pre-anc-visit → pre-consult.
obstetricshttps://previsit.summary.to/obstetrics/bRJIY1oc8BgtMCucjWfPJk3PHint for which UI mode the link is intended for
400
Validation error
object
Invalid link1003401
Invalid API key
object
Invalid link1003409
Idempotency-Key body mismatch
object
Invalid link1003429
Rate limit / quota exceeded
object
Invalid link1003