Developer API

MLS FHIR R4 API

Standards-based access to your practice's notes, patients, and visits — and a SMART on FHIR bridge that writes notes straight back into your EMR.

Base URL
https://scrivara-backend.onrender.com/fhir
Auth — send your API key as a bearer token. Generate one in MLS → Settings → API.
Authorization: Bearer mls_xxxxxxxxxxxxxxxx
Accept: application/fhir+json
Conformance: /fhir/metadata · SMART config: /.well-known/smart-configuration

Patients

GET/fhir/Patient?name=smith

Returns a FHIR Bundle of Patient resources for your practice.

GET/fhir/Patient/{id}

Encounters

GET/fhir/Encounter

Your scheduled/seen visits as FHIR Encounter resources.

Clinical notes (DocumentReference)

GET/fhir/DocumentReference?patient={id}&_since=2026-01-01

The scribe's finished notes. The note text is base64 in content[0].attachment.data.

GET/fhir/DocumentReference/{id}
POST/fhir/DocumentReference

Write a note into MLS:

POST https://scrivara-backend.onrender.com/fhir/DocumentReference
Authorization: Bearer mls_...
Content-Type: application/fhir+json

{
  "resourceType": "DocumentReference",
  "status": "current",
  "subject": { "reference": "Patient/EXTERNAL_ID" },
  "content": [{ "attachment": {
    "contentType": "text/plain",
    "data": "<base64 of the note text>"
  }}]
}

Real-time push (webhooks)

Register an https endpoint and MLS will POST the FHIR DocumentReference the moment a note is signed, HMAC-signed in X-MLS-Signature.

POST/api/fhir/webhooks { "url": "https://your-app/webhook" }

SMART on FHIR — write back into your EMR

Connect an EMR (athenahealth, Epic, Cerner) once; MLS then writes finished notes straight into the patient's chart.

GET/smart/connect → returns the EMR authorize URL (OAuth2 + PKCE)
GET/smart/callback → EMR redirects here; tokens stored
POST/smart/push/{noteId} → writes that note into the connected chart

Status: /smart/status

FHIR® is a registered trademark of HL7. MLS is not affiliated with HL7, athenahealth, Epic, or Oracle Health.