← Back to Thríamvos

Connecting Apple Health

Resting heart rate, HRV, sleep and respiratory rate, forwarded from your watch to Thríamvos. About ten minutes, once.

Before you start

Why a second app is needed at all

This is the real caveat, and we would rather state it plainly than call it "Apple Health integration" and leave the bridge unmentioned. HealthKit is an on-device iOS interface. A website cannot read it — there is no browser access to HealthKit at all. Thríamvos is a web app, so the only route is an app on your phone that you configure to forward readings to us.

Health Auto Export is chosen and configured by you, it is not controlled by us, and its own privacy practices govern how it reads your Apple Health data before sending it on. A native iOS app would remove that hop entirely. It is on the roadmap, not built.

We point at HealthKit rather than a vendor API because it has the strongest privacy architecture of the mainstream options: readings held encrypted on your device, per-data-type permission rather than blanket access, and an Apple rule against using that data for advertising.

Setting it up

  1. Generate your token

    In Thríamvos, open Settings → HealthKit Sync and press Generate Token. Copy it straight away — it is shown once and never again. The same screen shows your webhook URL.

    Treat the token like a password: anyone holding it can post readings to your account. Regenerating replaces it and immediately invalidates the old one.

  2. Create a REST API automation

    In Health Auto Export, go to Automations and add a new one. Choose REST API as the type and paste your webhook URL as the destination. Leave the method as POST and the format as JSON.

  3. Add your token as a header

    In the automation's headers, add one named X-Health-Token and paste your token as its value. This is what tells us the readings are yours — without it the request is rejected.

  4. Choose the four metrics

    Select Resting Heart Rate, Heart Rate Variability, Sleep Analysis and Respiratory Rate. Anything else you send is ignored rather than stored.

  5. Run it once, then let it schedule

    Trigger the automation by hand to confirm it works, then set it to run daily. Morning is the sensible slot — the overnight readings it depends on are complete by then.

    Back in Thríamvos, Settings → Stored readings should list what arrived within a minute or so.

What we ask for, and why

MetricWhat it is used for
Resting Heart RateThe baseline signal — a rise above your own normal is the clearest sign of accumulated fatigue.
Heart Rate VariabilityBeat-to-beat variation overnight, the main input to the Autonomic Recovery Index.
Sleep AnalysisDuration, measured against your own average rather than a fixed eight-hour target.
Respiratory RateOvernight breathing rate, which drifts up under illness or heavy load.

Each signal needs seven daily readings before we will score a day against it. Below that the spread is mostly noise, so you will see the reading stored but no recovery figure yet — that is deliberate, not a fault.

When nothing arrives

  • Rejected as unauthorised. The header name must be exactly X-Health-Token, and the value must be the token as copied — a trailing space is the usual culprit. If you have generated a token since setting the automation up, the old one no longer works.
  • Accepted, but nothing stored. The export probably contained none of the four metrics above. Check the automation's selection, and check the watch actually recorded that night — HRV and resting heart rate need it worn while you sleep.
  • It worked once and stopped. Health Auto Export needs background permission on the phone to run on a schedule. Confirm the automation is enabled and that the app is allowed to refresh in the background.
  • Readings land on the wrong day. We record a reading against the date the export gives it. An automation running before midnight can attribute a night to the previous day; moving the schedule to the morning fixes it.

No watch?

Training load works regardless — it comes from Strava, which needs no wearable at all. Recovery scoring needs overnight vitals, but you can type them in yourself under Settings → Manual entry; any subset is fine, and the same seven-reading threshold applies.

What we receive

Only the four metrics listed above, as daily values. We do not receive your workouts from Apple Health, your location, or anything else in your Health app. What arrives is stored against your account under row-level security, and covered by the Privacy Policy. You can export or delete all of it from Settings → Your data at any time, and delete individual readings one by one.

Stuck on a step? Email sweatisfree@gmail.com and say which number you reached.