Skip to content

Create a patient-driven pre-visit session

POST
/v1/sessions/previsit/patient

Sugar alias for POST /v1/sessions with type=pre-consult and ui_type=patient. Use when the patient fills the pre-visit form before arriving (SMS / WhatsApp link).

Identical request and response to the generic endpoint, except type must NOT be sent in the body — it’s pinned to pre-consult by this route. Response ui_type is always patient.

Authorizations

Parameters

Header Parameters

Idempotency-Key

Optional UUID to deduplicate retries. 24h TTL.

string format: uuid

Request Body required

object
patient

Patient name + phone; pre-fills form intro

object
clinic

Doctor + display_name; shown on form + in share URL

object
template_code

E.g. previsit_anc_v1 for ANC

string
nullable
appointment_id

Your appointment ID, echoed in webhooks

string
nullable
language
string
en
expires_in_minutes

Max 10080 (7 days)

integer
default: 120
metadata
object
key
additional properties
any
{
"patient": {
"name": "Priya S",
"phone": "+919876543210"
},
"clinic": {
"doctor": "Dr. Padmavathi",
"display_name": "Sunrise Clinic"
}
}

Responses

201

Session created (ui_type=patient)

object
id
string format: uuid
session_id
string format: uuid
token

Opaque public token used in patient-facing URLs

string
type

Server-side aliases: emergency-summaryemergency, pre-anc-visitpre-consult.

string
Allowed values: pre-consult clinical-note discharge referral transfer medication lab-requisition history international emergency emergency-summary pre-anc-visit pre-visit-clinic care-plan radiology
specialty
string
nullable
obstetrics
session_url
string format: uri
https://previsit.summary.to/obstetrics/bRJIY1oc8BgtMCucjWfPJk3P
expires_at
string format: date-time
created_at
string format: date-time
ui_type

Hint for which UI mode the link is intended for

string
Allowed values: patient clinician

400

Validation error

object
error
required
string
Invalid link
code
integer
1003

401

Invalid API key

object
error
required
string
Invalid link
code
integer
1003

409

Idempotency-Key body mismatch

object
error
required
string
Invalid link
code
integer
1003

429

Rate limit / quota exceeded

object
error
required
string
Invalid link
code
integer
1003