Skip to main content
POST
Update the treatment mirror

Authorizations

Authorization
string
header
default:Bearer sandbox_any_token_works
required

A brand's server, one OAuth client per brand and environment. Get a token with the client_credentials grant and send it as Authorization: Bearer <token>. Tokens last 1 hour. A brand server reads status and ids only; it never reads clinical content. A platform partner holds one client for all its brands and gets one token per brand, naming it with tenant_id.

Headers

Idempotency-Key
string
required

A unique key per logical request, for example a UUID. Retrying with the same key and the same body within 24 hours returns the first response (with Idempotent-Replayed: true) instead of creating a duplicate. The same key with a different body is refused with 422 idempotency_key_reused.

Required string length: 8 - 255

Path Parameters

enrollment_id
string<uuid>
required

Body

application/json

The medication, dose and schedule your prescriber set. TeraRx mirrors it and never changes it. Each call adds a version; the latest is the current treatment and earlier ones are the dose history.

medication_id
string<uuid>
required

From GET /v1/medications.

Example:

"6f1d2c3b-4a59-4e8f-9d7c-1b2a3c4d5e6f"

dose_mg
number
required
Required range: x <= 100
Example:

0.5

phase
enum<string>
required
Available options:
pending_start,
titration,
maintenance,
taper,
off_ramp,
paused,
stopped
Example:

"titration"

dose_amount
number

The dose as prescribed, when it is not in mg (for example 20 units of a compounded vial).

Example:

20

dose_unit
string
Maximum string length: 20
Example:

"units"

schedule
object

A custom titration ladder or microdosing schedule.

Example:
injection_weekday
integer

0 is Sunday. Drives injection-day reminders.

Required range: 0 <= x <= 6
Example:

1

started_on
string<date>

First dose. The treatment week is counted from it.

Example:

"2026-09-28"

effective_from
string<date-time>

When this dose takes effect. Defaults to now.

Example:

"2026-10-26T14:05:00Z"

note
string

Visible to the care team only.

Maximum string length: 1000
Example:

"Step up to 0.5 mg per titration schedule"

Response

The new current treatment.

id
string<uuid>
required
Example:

"0190f5c7-1a2b-7c3d-8e4f-5a6b7c8d9e0f"

medication
object
required
dose_mg
number
required
Example:

0.5

phase
enum<string>
required
Available options:
pending_start,
titration,
maintenance,
taper,
off_ramp,
paused,
stopped
Example:

"titration"

effective_from
string<date-time>
required

ISO 8601 in UTC.

Example:

"2026-10-26T14:05:00Z"

source
enum<string>
required
read-only

Set by the API from the caller. brand_api for brand servers, brand_app for patient tokens issued to a brand.

Available options:
app,
brand_app,
brand_api,
wearable,
coach,
ai,
system
Example:

"brand_app"

created_at
string<date-time>
required

ISO 8601 in UTC.

Example:

"2026-10-26T14:05:00Z"

dose_amount
number | null
Example:

null

dose_unit
string | null
Example:

null

schedule
object | null
Example:

null

injection_weekday
integer | null
Example:

1

started_on
string<date> | null
Example:

"2026-09-28"

treatment_week
integer | null
read-only

Week of treatment today, counted from started_on (week 1 is the first 7 days).

Example:

5

note
string | null
Example:

"Step up to 0.5 mg per titration schedule"