Apple Health data, in your own stack.
Your iOS app reads HealthKit and uploads it to your Open Health Sync server, which stores the raw files and turns them into one model. A Health app export can be imported too, history included.
- Source
- On-device, iPhone and Apple Watch
- How the data arrives
- On-device (HealthKit). Your iOS app uploads gzip NDJSON parts to POST /v1/ingest/apple-health.
What it collects.
Each record maps to the same model as every other source, with the provider, source and device it came from.
- Quantities such as heart rate, steps and body mass
- Category samples
- Sleep
- Workouts and their routes
- Nutrition
- ECG recordings and heartbeat (RR) series, stored
How it works.
- 01
Your app reads HealthKit
With the user's permission, your iOS app reads their Health data on the phone.
- 02
It uploads to your server
Gzip NDJSON parts go to POST /v1/ingest/apple-health. A re-sent upload is answered as a duplicate.
- 03
You read one model
Raw files are kept, records are normalized to one unit per quantity and served over REST, MCP and FHIR R4.
Before you start.
- HealthKit lives on the phone, so there is no cloud API to pull from: an app has to read it and upload it.
- The Swift SDK in the repository reads HealthKit and uploads what changed, and an example iOS app shows it. It is not on a package registry yet: add it from the repository.
- ohs import apple-health loads an export from the Health app, history included.
- Data that other apps and devices write to HealthKit arrives this way too.
Set it up.
Add the Swift SDK from the repository: its HealthKitSync reads HealthKit and uploads what changed. The guide has every step.
# What your iOS app sends: one gzip NDJSON part per data typecurl -s -X POST $OHS/v1/ingest/apple-health \ -H "Authorization: Bearer $USER_TOKEN" -H "Content-Type: application/gzip" \ -H "X-OHS-Type: HKQuantityTypeIdentifierHeartRate" -H "X-OHS-Day: 2026-10-12" \ -H "X-OHS-Batch: run-1" -H "X-OHS-Part: 0" --data-binary @part-0.ndjson.gz# Or load a Health app export, history includedOHS_TOKEN=ohs_ut_... ohs import apple-health export.zip --url $OHS# Read what came incurl -s "$OHS/v1/users/$USER_ID/samples?type=heart_rate" -H "Authorization: Bearer $KEY"Questions.
Can I use Apple Health with Open Health Sync today?
Yes. The Apple Health connector ships in v0.1.0.
Do I need anything from Apple Health?
HealthKit lives on the phone, so there is no cloud API to pull from: an app has to read it and upload it.
Where does the data go?
Only to the server you run. Open Health Sync is self-hosted software, not a service: no account with us and no call home. Each user can be deleted with one call, raw files included.