Skip to main content
Write structured records straight into a Subject’s store, and read them back. Every write runs through the platform’s standardization pipeline — records come back with a LOINC code, canonical name, UCUM-normalized value/unit, and a FHIR mirror. The chat agent reads this same data with its built-in tools. Health data arrives in three shapes — each has exactly one door in: Mirobody hosts, standardizes and serves the data to AI — collecting it (device OAuth, app capture) is your side of the line.
The user field is the tenant-isolation key. The backend maps (your account, user) to an internal Subject; each user you pass is fully isolated from the others. Pass each end-user’s stable id and their data never crosses over. Omit it and the call falls back to your account’s default Subject. Subjects are invisible to the Mirobody web app and to other developers. The user value is normalized (trimmed + lowercased) before mapping, so Alice and alice resolve to the SAME Subject — pass a stable, canonical id.

Write records

Response — standardized counts the records that resolved to a LOINC code on the way in:
Every write is standardized, not just stored. Each record’s value/unit is UCUM-parsed and its indicator name resolved to LOINC deterministically (curated corpus + embedding — no LLM guessing). See Standardization. To preview that pipeline without writing anything, use POST /v1/extract with store=false.

Episodes (sleep, workouts)

Episode-type records span a period rather than a point in time — put the start in time and the end in the optional end_time:
Writing device data at scale (daily aggregation, batching, vendors)? See the device-data cookbook.

Read records

The response is an OpenAI-style list, newest first. value is the human-readable string (e.g. "5.4 mmol/L"); the machine-readable fields ride alongside:

Erase records

Hard-deletes the Subject’s records — right-to-be-forgotten semantics (rows physically removed, not flagged). Three scopes, from narrowest to widest:
To erase everything about a Subject (records + files + conversations + the identity mapping), use DELETE /v1/subjects/{user} — see Compliance.

Use-and-forget data

There is no retention: "none" — writing to the store while asking not to store is contradictory, and the value is rejected like any other non-enum value. Two clean patterns instead:
  • Dry-run analysis, zero side effectsPOST /v1/extract with store=false (the default): standardization results out, nothing written.
  • Short-lived working data — write with retention: "1h", or retention: "session" + a session_id you delete when done.