Skip to main content
The consultation context call sends patient identity and clinical information to Telepatia before a session starts. Telepatia uses this data to pre-populate the patient record in the scribe interface and link the completed session back to your system. Call this endpoint before generating a login link. If you skip it, the scribe session will start without patient context.

Key fields

FieldRequiredDescription
consultationInternalIdNoYour internal ID for this consultation. If omitted, Telepatia generates one. Used to retrieve the session later.
nameYesPatient full name
idCountryYesCountry of the ID document (ISO alpha-2, alpha-3, or full name)
idTypeYesType of ID document (see table below)
idValueYesDocument number
medicalRecordConfigurationNoSmart Template inline (recommended). Full JSON; server dedups by content hash. See Smart Templates.
medicalRecordConfigurationIdNoSmart Template by id (from /v1/medical-record-configurations).
scribeSessionConfigurationIdNoLegacy Session Template id (from /v1/scribe-session-configurations).
scribeSessionModalityNoIN_PERSON or REMOTE
notesNoFree-text clinical notes visible to the clinician
pastMedicalHistoryNoPatient’s medical history

Accepted documents by country

CountryidCountryDocumentidTypeFormat
ColombiaCO / COL / COLOMBIACédula de CiudadaníaCC8–10 digits
ColombiaTarjeta de IdentidadTI10–11 digits
ColombiaCédula de ExtranjeríaCE6–7 digits
ColombiaRegistro CivilRC1–11 digits
BrazilBR / BRA / BRAZILRegistro GeralRG7–9 alphanumeric
BrazilCPFCPFXXX.XXX.XXX-XX
AnyPassportPASSPORT6–9 alphanumeric
AnyOtherOTHER_DOCAny non-empty string
The idType must be valid for the given idCountry. For example, passing CC with idCountry: BR returns a 400 error.

Templates: pass exactly one

medicalRecordConfiguration, medicalRecordConfigurationId, and scribeSessionConfigurationId are mutually exclusive — pass at most one. We recommend the inline medicalRecordConfiguration form: it’s reproducible, lets you version the template alongside your code, and the server dedups by content hash so you don’t accumulate duplicates.
curl -X POST https://scribe-api.telepatia.ai/v1/set-consultation-context \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "consultationInternalId": "CONSULT-12345",
    "name": "John Doe",
    "idCountry": "CO",
    "idType": "CC",
    "idValue": "123456789",
    "notes": "Patient reports recurring headache",
    "pastMedicalHistory": "Hypertension diagnosed 2020",
    "scribeSessionModality": "IN_PERSON",
    "medicalRecordConfiguration": {
      "chiefComplaint": {
        "instructionSet": { "telepatiaPromptId": "CHIEF_COMPLAINT" },
        "schema": {
          "type": "object",
          "instructions": "Chief complaint",
          "properties": {
            "chiefComplaint": { "type": "string", "instructions": "Patient words" }
          }
        }
      }
    }
  }'

Example request — Smart Template by id

curl -X POST https://scribe-api.telepatia.ai/v1/set-consultation-context \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "consultationInternalId": "CONSULT-12345",
    "name": "John Doe",
    "idCountry": "CO",
    "idType": "CC",
    "idValue": "123456789",
    "scribeSessionModality": "IN_PERSON",
    "medicalRecordConfigurationId": "mrc_a1b2c3d4e5f6g7h8"
  }'
Response:
{
  "success": true,
  "consultationInternalId": "CONSULT-12345"
}
Save the consultationInternalId — you’ll need it to generate the login link and retrieve the session results.