Device IntegrationHealthcare Interoperability

Apple Health API Integration Guide 2026: HealthKit

June 16, 202620 min read
Written by
Jitendra Choudhary
Jitendra Choudhary

CTO & Co-Founder

CTO & Co-Founder at Nirmitee.io. Architects healthcare integrations across FHIR, SMART on FHIR, ABDM and NHCX, writing from production experience taking hospital software from sandbox to go-live.

Apple Health API Integration Guide 2026: HealthKit

Yes, you can integrate Apple Health, but there is no Apple Health API in the cloud: the HealthKit API runs on the device. Apple says "the user's device stores all HealthKit data locally", so you need your own iPhone app that reads HealthKit and sends the data to your server. HealthKit itself is free, and the only fixed cost is the Apple Developer Program at US$99 a year. The rule that decides most projects is App Review Guideline 5.1.3: no ads, marketing or data mining with health data, no selling it to data brokers, and no storing personal health information in iCloud.

Want a team to build this for you? Our medical device integration services cover the vendor approval, the data pipeline and EHR delivery, and our remote patient monitoring software work covers RPM programs.

Apple Health integration at a glance

QuestionAnswer
Official API?Yes, on the device only. The HealthKit framework on iPhone, Apple Watch, Vision Pro and iPad (iPadOS 17 and later). No server or REST API.
Cost to the developerHealthKit is free. Apple Developer Program US$99 a year. Fee waivers exist for nonprofits, schools and government bodies that do not sell apps.
Does the end user need a subscription or device?An iPhone, or an iPad on iPadOS 17 or later. Apple Watch adds heart, sleep and ECG data but is optional. Mac has no Health store.
Same-day start?Yes for development on real devices. Public release needs App Review.
Who approves scale-up?Apple App Review. There is no separate HealthKit partner program. Review time is not published.
HIPAA / BAAApple's stance is not published. The Developer Program License Agreement does not mention HIPAA. HIPAA depends on who runs the app.
Raw or summary data?Raw samples, each with start, end, source app and device, plus statistics queries for totals and averages.
HistoryNo cap published on iPhone. From iOS 27 a user can share only a limited window of recent data.
First buildAbout 7 weeks to App Review, plus 2 to 3 weeks if you add Health Records (our estimate).

Why there is no Apple Health API on a server

Each iPhone, Apple Watch, Vision Pro and newer iPad has its own HealthKit store, and Apple syncs them between the user's own devices. iCloud backup of Health data is end-to-end encrypted. Apple does not offer a cloud endpoint, OAuth flow or webhook for third parties. So every Apple Health integration has the same shape: your iOS app asks for permission, reads from HealthKit on the phone, and uploads to your backend. An aggregator SDK changes who owns the backend, not this shape.

The store is encrypted while the phone is locked. Apple warns that your app "may not be able to read data from the store when it runs in the background" at that time. Build your upload queue to wait for the next unlock.

If you also have Android users, read our Health Connect API integration guide. For Fitbit and Pixel Watch data on a server, read our Fitbit and Google Health API guide.

Integration strategies

RouteOwn mobile app?Own server?Vendor approval or contract?SDK?LatencySupported dataNot supportedBest for
Your own iOS app with HealthKitYes, iOSYes, to receive uploadsApp Review only. HealthKit capability in Xcode.Yes, HealthKit frameworkBackground delivery: immediate, hourly, daily or weekly by type. Step count at most hourly. Paused while locked.All quantity, category, workout, ECG, medication and clinical record types belowAndroid users. Writing ECG, AFib burden or Walking Steadiness. Raw sensor streams.Healthcare products that must own the data path
Health Records (clinical records)Yes, iOSYesApp Review. Separate Clinical Health Records checkbox. Apple may reject apps that tick it and do not use the data.Yes, HealthKitAfter the Health app pulls from the provider9 FHIR record types (DSTU2 and R4) from connected health systemsWriting records. Countries beyond US, Canada and UK.Patient-shared labs, meds and conditions without an EHR contract
Aggregator SDK in your app (Terra, Junction, ROOK, Sahha, Spike, Thryve)Yes, iOSOptional. The aggregator's cloud receives the data.Aggregator contract, plus your own App ReviewYes, the aggregator's SDKJunction: hourly batches. Terra and Spike: only when the phone is unlocked.The HealthKit types each vendor maps, plus its cloud wearablesTypes the vendor does not map. Prices not published.Consumer teams that want one schema across iOS, Android and cloud wearables
Health app export by the userNoYes, to take uploadsNoNoManual, one-offWhat the user exportsAny ongoing feedOne-time history imports only
Apple server APIDoes not exist. Apple states the data is stored on the device.

For a healthcare product, build your own iOS app with HealthKit. You keep the data path, the consent screen and the App Review answers in your hands, and you can add Health Records. A consumer app that also needs Android and cloud wearables can ship faster with an aggregator SDK, but it still needs its own iOS app, its own App Review and the same rules on health data.

We built this kind of app for a consumer health records company, on iPhone and Android: see the health data aggregation app case study.

Build it yourself, use an aggregator, or work with a partner

QuestionBuild in-houseWearable aggregatorBuild with a partner (Nirmitee)
Whose iOS app?YoursStill yours. The aggregator's SDK runs inside your app.Yours. We build it in your Apple developer account.
App Review and Guideline 5.1.3You answer themYou still answer them, since the app is yoursWe prepare the answers with you. Your account submits.
Background sync and upload queueYou build and run themThe SDK runs them, with the same iOS limitsWe build them, then hand them to you or run them
Data modelHealthKit samplesThe aggregator's schemaFHIR Observations for your EHR or remote monitoring stack
Android and other devices laterOne new build per platformMany sources through one APISame pattern reused across devices
Time to first App Store releaseDepends on your teamDepends on the aggregator's onboardingAbout 7 weeks in our estimate (see the delivery timeline), plus App Review
Cost shapeEngineering time plus the US$99 Developer ProgramAggregator fee. Pricing is not published.Project fee, scoped after a call
Every way to get Apple Health data, and what each one needs.

What data you can get

Every reading is a sample with its own time range and source. You can read raw samples or ask HealthKit for statistics over a time window. The docs list 123 quantity type identifiers today.

GroupTypesGranularityHistoryPush or pull
ActivitySteps, walking and running distance and other distance types, flights climbed, active energy, basal energy, exercise time, stand time, VO2 max, physical effort, workout effort score, time in daylightRaw samples and statisticsNo cap publishedBoth
WorkoutsWorkouts with type, duration, energy, distance, and routesSessionsSameBoth
HeartHeart rate, resting heart rate, walking heart rate average, HRV (SDNN), heart rate recovery, AFib burden (read only), high, low and irregular rhythm events, low cardio fitness events, hypertension events (iOS 26.2)Raw samples and eventsSameBoth
ECGApple Watch electrocardiograms with voltage data (read only)Per recordingSameBoth
VitalsBlood pressure (systolic and diastolic as a pair), respiratory rate, oxygen saturation, body temperature, basal body temperature, sleeping wrist temperature, sleeping breathing disturbancesRaw samplesSameBoth. Blood pressure pairs cannot use background delivery.
MetabolicBlood glucose, insulin delivery, blood alcoholRaw samplesSameBoth
BodyWeight, height, BMI, body fat, lean body mass, waist circumferenceRaw samplesSameBoth
RespiratoryForced vital capacity, FEV1, peak expiratory flow, inhaler usageRaw samplesSameBoth
MobilityWalking speed, step length, asymmetry, double support, Walking Steadiness (read only), six-minute walk distance, stair speed, fallsRaw samplesSameBoth
SleepIn bed, awake, core, deep, REM, asleep unspecifiedStage samplesSameBoth
NutritionAbout 38 dietary types, waterRaw samplesSameBoth. Food pairs cannot use background delivery.
HearingEnvironmental and headphone audio exposure, audiogramsRaw samplesSameBoth
Reproductive healthMenstrual flow, ovulation, pregnancy, lactation, contraceptives and moreEventsSameBoth
Mental health and mindfulnessMindful sessions, State of Mind and scored assessments (iOS 18)EventsSameBoth
MedicationsMedication dose events and user medications (iOS 26)EventsSameBoth. Whether third parties can write doses is not published.
OtherElectrodermal activity, UV exposure, handwashing, toothbrushing, vision prescriptionsRaw samplesSameBoth
CharacteristicsDate of birth, biological sex, blood type, skin type (read only)Single valuesNot applicablePull
Clinical recordsAllergies, clinical notes, conditions, coverage, immunizations, lab results, medications, procedures, vital signsFHIR DSTU2 or R4 resourcesWhat the provider sendsBoth
Verifiable recordsSMART Health Cards and EU Digital COVID CertificatesSigned recordsNot applicablePull

HRV in HealthKit is SDNN. Apple's docs show a separate RMSSD type with iOS 27 availability, but its description is not published yet. Most other wearables report RMSSD, so do not mix the two in one chart.

Once data reaches your server, you will usually turn it into FHIR Observations. Our post on sending Apple HealthKit and Health Connect data to a FHIR server covers that step.

What is inside one HealthKit sample, and inside an ECG

Every reading is an object with the same core fields. These come from Apple's HKObject, HKSample and HKQuantitySample pages.

FieldWhat it holds
uuidAn ID HealthKit assigns when the object is created. Use it to dedupe and to match deletions.
startDate, endDateThe time range of the reading. A step sample covers a span. A heart rate sample can be a single moment.
quantity and countThe value with its unit (HKQuantity), and how many readings were merged into it
sourceRevisionThe app that wrote it, its version, product type and operating system version
deviceName, manufacturer, model, hardware, firmware and software version, and a UDI device identifier when the writer sets one
metadataOptional keys, such as whether the user typed the value in, an external ID set by the source, sync identifier and version, and for heart rate a motion context of sedentary, active or not set

An Apple Watch ECG (HKElectrocardiogram) is the richest record. It adds a classification (sinus rhythm, atrial fibrillation, four inconclusive types, unrecognized or not set), average heart rate, a symptoms status, the sampling frequency, the number of voltage readings, and the voltage series itself through HKElectrocardiogramQuery. The only lead value is "Apple Watch similar to Lead I". The algorithm version sits in metadata.

Which wearables write to Apple Health

From each vendor's help pages, checked 10 Nov 2026. "Not published" means we found no vendor page.

Source appWrites to Apple Health?What it writes
Apple Watch and iPhoneYes, nativelySteps, activity, heart, sleep, ECG, mobility and more
OuraYes, read and writeActive energy, heart rate, height, mindful minutes, respiratory rate, sleep and stages, steps, weight, workouts and routes. HRV is not listed.
WHOOPYesWorkouts, active energy, heart rate in activities, sleep, resting heart rate, respiratory rate, SpO2, steps if turned on. Not HRV, recovery or strain.
Garmin ConnectYes, one way (third-party pages, Garmin's own page not found)Energy, heart rate min and max in activities, sleep, steps, distance, floors, weight, body fat, workouts. Not Body Battery, VO2 max or GPS tracks.
Fitbit / Google Health appYes, on iOS 16.4 or laterSteps, VO2 max, activity, sleep and stages, heart rate, SpO2, resting heart rate, glucose, weight, nutrition, cycle data. Reads only 3 months of Apple Health history.
Dexcom G7 and SteloYesBlood glucose with a 3-hour delay
WithingsYes. Accounts created after 13 Oct 2026 need Withings+. Sync is not automatic on iOS.Categories the user picks, including weight, blood pressure, heart rate, SpO2, sleep
Polar FlowYes, write onlySleep times, steps, workouts with heart rate and energy. Not continuous heart rate.
StravaYesActivities. Reads only Apple Workout activities from the last 30 days.
MyFitnessPalYesFood and weight. Only data logged after connecting.
PelotonYesWorkouts. Bike and Tread workouts appear after the iPhone app is opened.
COROS, Ultrahuman, Eight SleepYesCOROS: user-chosen types. Ultrahuman: HRV, skin temperature, energy. Eight Sleep: sleep.
SuuntoForum reports onlyWorkouts. Users report sleep and VO2 max missing.
FreeStyle LibreNot published

What you cannot get

  • Any data from a server. No Apple cloud API, no webhook, no OAuth.
  • Whether the user denied read access. Apple says that if you are not given permission "it simply appears as if there is no data".
  • Reads while the phone is locked, in many background cases.
  • Android users.
  • Write access to ECG, AFib burden, Walking Steadiness, clinical records and characteristics. They are read only.
  • Raw sensor streams such as PPG or accelerometer. HealthKit has no type for them.
  • Vendor scores a source app does not write, such as WHOOP recovery or Garmin Body Battery.
  • Full history from users on iOS 27 who choose a limited window.
  • Health Records outside the US, Canada and UK, and from institutions not on Apple's list.
  • Background delivery for blood pressure and food pairs. Poll these when the app runs.

How to get access

  1. Join the Apple Developer Program (US$99 a year), or apply for a fee waiver if you are a nonprofit, school or government body.
  2. In Xcode, add the HealthKit capability. Tick Clinical Health Records only if you will read clinical records.
  3. For background updates, add the HealthKit Background Delivery entitlement. Without it, background delivery fails with an authorization error on iOS 15 and later.
  4. Add the usage strings: NSHealthShareUsageDescription to read, NSHealthUpdateUsageDescription to write, and a Health Records usage string for clinical records. Missing strings crash the app when it asks for permission.
  5. Publish a privacy policy. Clinical record apps must have a working privacy policy URL, which appears on the permission sheet.
  6. Call isHealthDataAvailable() before anything else. It returns false on Mac and older iPads, and enterprise-managed devices may block HealthKit.
  7. Submit to App Review. Show the Health integration in your app's interface and state which health data you collect. If your app has regulatory clearance, attach the link. Review time is not published.

From zero to your first Apple Health data in four steps

There is no server call to make. Your first data comes from your own app on a real iPhone.

  1. Set up the project. Add the HealthKit capability in Xcode and set NSHealthShareUsageDescription (and NSHealthUpdateUsageDescription if you write data). Without these strings the permission request fails.
  2. Ask for permission. Check isHealthDataAvailable() first, then request the types you need. This is Apple's own example:
    let allTypes: Set = [
        HKQuantityType.workoutType(),
        HKQuantityType(.activeEnergyBurned),
        HKQuantityType(.distanceWalkingRunning),
        HKQuantityType(.heartRate)
    ]
    
    do {
        if HKHealthStore.isHealthDataAvailable() {
            try await healthStore.requestAuthorization(toShare: allTypes, read: allTypes)
        }
    } catch {
        // Usually missing usage strings, or no Health data on this device.
    }
    Apple does not tell your app whether the user allowed reading. A denied type looks the same as a type with no data.
  3. Read history once with an anchored query. HKAnchoredObjectQuery with a nil anchor returns every matching sample in the store. Save the new anchor it returns. The next run with that anchor returns only adds and deletes since then.
  4. Listen, then upload. There are no webhooks. Run an HKObserverQuery with background delivery, rerun the anchored query when it fires, and send the new samples to your server in a queue that waits out locked periods. Call the completion handler each time, since HealthKit stops background updates after three missed calls.

Terms you must know

  • Ads and data mining (Guideline 5.1.3(i)): no use or sharing of HealthKit data for advertising, marketing or data mining, other than improving health management or health research, and then only with permission. A healthcare product can use it for care. A wellness app cannot fund itself with ad targeting on this data.
  • Benefits to the user (5.1.3(i)): you may use the data to give the user a benefit, such as a lower insurance premium, only if your company is the one giving the benefit and the data is not shared with a third party. This shapes payer and employer programs. The insurer or employer should submit the app itself.
  • Selling (License Agreement 3.3.3(H)): you must not share or sell HealthKit data to advertising platforms, data brokers or information resellers. Other sharing needs the user's prior express consent.
  • Purpose (3.3.3(H) and Guideline 2.5.1): use HealthKit only for health, motion and fitness services, and integrate with the Health app. A non-health app asking for HealthKit gets rejected.
  • iCloud (5.1.3(ii)): do not store personal health information in iCloud. Store it on your own server. Do not write false data into HealthKit.
  • Research (5.1.3(iii) and (iv)): studies need participant consent covering purpose, risks, data handling, a contact and withdrawal, plus approval from an independent ethics board, with proof on request.
  • Medical apps (Guideline 1.4.1): apps that could give inaccurate data or be used to diagnose or treat get more scrutiny. Submit your clearance link if you have one.
  • Disclosure (5.1.3(i)): you must disclose the specific health data you collect.
  • HIPAA and BAA: Apple publishes no stance and offers no BAA in what we read. Apple's privacy page points HIPAA-covered apps to the ONC model privacy notice. If you are a covered entity or business associate, HIPAA applies to your app and server.
  • AI training, retention and termination: no HealthKit-specific clause found beyond the rules above.

Cost and payment terms

  • HealthKit: free. No per-user or per-call fee.
  • Apple Developer Program: US$99 a year. Fee waivers for qualifying nonprofits, schools and government bodies.
  • Apple Developer Enterprise Program: US$299 a year, for internal apps only. It cannot ship to the App Store, so it does not suit patient apps.
  • End user: no fee to Apple. Some source apps need their own paid tier to share, such as Withings+ for new Withings accounts.
  • Aggregators: Terra, Junction, ROOK, Sahha, Spike and Thryve did not publish prices on the pages we read. Ask for a per-user quote.
  • Your real cost is engineering: the iOS app, background sync, upload and dedupe, and App Review rounds.

Use cases

One reading from Apple Health to the care team.

Remote patient monitoring (RPM)

The patient installs your iOS app and grants blood pressure, weight, glucose and heart rate. Their Withings cuff or scale writes to Apple Health through the Withings app. HealthKit wakes your app through background delivery, your app runs an anchored query for new samples, uploads them, and your server posts FHIR Observations to the EHR or the care team's queue.

  • Blood pressure never wakes the app: blood pressure pairs do not support background delivery. Read on app open and send a reminder when no reading has arrived.
  • Readings look missing: the patient may have denied read access, which looks like no data. Show "no readings since" in the app and ask the patient to check Health settings.
  • Withings sync is not automatic on iOS: the user must open both apps. Remind patients, or use the Withings cloud API for cuffs instead.

Chronic care and diabetes programs

The patient grants blood glucose, insulin delivery, nutrition, steps and sleep. Dexcom writes glucose with a 3-hour delay. Your app pulls new samples hourly and your server builds a daily view for the coach.

  • Delayed glucose: the 3-hour delay is Dexcom's rule. Do not use this route for real-time alerts.
  • Libre is unknown: Abbott does not publish Apple Health support. Confirm each CGM before you promise it.
  • Locked phone at night: reads pause. Your queue should catch up after the morning unlock.

Clinical trials and research

Participants install the study app, consent in the app, and grant steps, heart rate, mobility and sleep. Optionally they share Health Records for medical history. Data goes to the study database with source and device on each sample.

  • App Review asks for ethics approval: keep the board approval ready to send.
  • Limited history on iOS 27: users may share only recent data. Read getEarliestAuthorizedSampleDate and record the baseline window per participant.
  • Mixed devices: Apple Watch and other wearables write different types. Record the source and set rules per type.

Patient-shared health records

A patient connects their health system in the Health app. Your app asks for clinical record types on a separate permission sheet, reads the FHIR resources, and your server loads labs, medications and conditions into your care platform.

  • Two FHIR versions: records come as DSTU2 or R4. Parse both.
  • Labs and vitals split: HealthKit splits Observation into lab results and vital signs types. Ask for both.
  • New records need a new ask: by default the app must ask each time before reading new records. Prompt the user when they open the app.

Payer and employer wellness

Members install the app and grant steps, workouts and sleep. The app uploads daily totals and the server awards points or premium discounts.

  • Wrong submitter: a premium benefit is allowed only if the benefit provider submits the app and does not share the data with a third party. Have the payer or employer own the App Store listing.
  • Step totals from two sources: iPhone and Apple Watch both count steps. Count one source per time window, or use HealthKit statistics queries, and do not add raw samples from both.
  • Android members: Apple Health cannot reach them. Pair with a Health Connect build.

Consumer fitness, sleep and coaching apps

The user grants workouts, heart rate, HRV, sleep and VO2 max. Your app reads data from Apple Watch, Oura, Garmin or WHOOP in one place and writes its own workouts back so they count toward Activity rings.

  • HRV does not match the wearable's app: HealthKit uses SDNN while many wearables show RMSSD, and some (Oura, WHOOP) do not write HRV to Apple Health at all. Label the metric.
  • Sleep from several sources: Apple Watch and a ring may both write sleep. Pick one source per night.
  • Background budget on Apple Watch: watchOS apps get four updates an hour, and only with a complication on the active watch face.

Apple Health data in an EHR or remote monitoring program

Most healthcare teams want Apple Health readings next to clinical data, not in a separate app. The usual pattern is for your app to upload samples to your server, which turns each one into a FHIR Observation, the standard record for a measurement, and sends it to the EHR or remote monitoring platform. Guideline 5.1.3 still applies after upload: no ads, no data mining, and no sharing with third parties without the user's permission.

HealthKit typeFHIR ObservationLOINC code
heartRateHeart rate, beats per minute8867-4
restingHeartRateResting heart rate40443-4
heartRateVariabilitySDNNHRV as SDNN, milliseconds80404-7
bloodPressureSystolic and Diastolic (one correlation)Blood pressure panel with two components85354-9, with 8480-6 and 8462-4
oxygenSaturationOxygen saturation by pulse oximetry59408-5
respiratoryRateRespiratory rate9279-1
bodyMassBody weight29463-7
bloodGlucoseGlucose in blood2339-0
stepCount, summed per daySteps in 24 hours41950-7
sleepAnalysis, asleep stages summedSleep duration93832-4

Keep the HealthKit uuid on each Observation, so a deletion found by the anchored query can remove the right record. Clinical records from Health Records already arrive as FHIR DSTU2 or R4 resources, so you pass them on rather than map them.

Known blockers and gotchas

  • Read denial is hidden. authorizationStatus covers write access only. Design the app so empty data shows a clear "check Health permissions" path.
  • Three strikes in background delivery. Call the observer query completion handler every time. Apple says if your app fails to respond three times, HealthKit stops sending background updates.
  • Locked store. Background reads can fail while the phone is locked. Writes are cached until unlock.
  • Step count is hourly at most. Asking for immediate delivery of steps on iOS still gives at most one wake per hour.
  • No background delivery in the Simulator. Test on real devices.
  • Clinical checkbox rejections. App Review may reject apps that enable Clinical Health Records without using the data.
  • Missing usage strings crash the app. Add both read and write strings even if you only write a little.
  • Per-object authorization. Some types (since iOS 16) need the user to approve each object. Check requiresPerObjectAuthorization and handle the extra prompt.
  • Apple Watch purges old data. To save space, the watch keeps only recent data. Read history from the iPhone.
  • Enterprise devices. Managed devices may block HealthKit. isHealthDataAvailable() tells you.
  • iOS 27 limited history. Users can share only recent data. Backfill plans must check the earliest authorized date.

Delivery timeline

Our estimate for a first App Store release. Apple does not publish one.

WeekWorkDepends on Apple?
1 to 2Developer Program, app shell, entitlements, usage strings, permission screens, data type choiceProgram sign-up only
3 to 4Anchored queries, backfill, background delivery, upload queue that survives locked periods, dedupe by sample ID and sourceNo
5 to 6Server mapping to FHIR, EHR or app screens, real-device testingNo
7App Review submission and fixesYes, review time not published
+2 to 3Health Records: DSTU2 and R4 parsing, separate permission flowApp Review again

Questions to ask before you sign

HealthKit has no vendor contract, so these go to your own team, the source app vendors and any aggregator.

  1. Who submits the app? If the program gives a premium or cash benefit, the benefit provider must be the App Store seller.
  2. Which data types does each source device write to Apple Health, how often, and with what delay?
  3. Does the source app need a paid tier to share, as with Withings+?
  4. Will we need Health Records, and are our patients' health systems on Apple's list?
  5. Aggregator: what is the per-user price, and does background sync work while the phone is locked?
  6. Aggregator: do you sign a BAA, and where is data stored?
  7. Aggregator: which HealthKit types do you map, and do you keep the source app and device per sample?
  8. Do we have ethics board approval ready for App Review if this is research?

Other device integration guides

Apple Health is often one source among several. Each guide below uses the same layout, so you can compare access, data and terms side by side. For the full service, see medical device integration.

Ready to build with Apple Health?

Tell us your device, your users and your target date, and we will send back the route, the vendor approvals you need and a build plan. Book a call about your device integration. We have no partnership with Apple, and we will say so in the plan.

For whoever builds this

  • Entitlements: com.apple.developer.healthkit, Clinical Health Records checkbox for health records access, com.apple.developer.healthkit.background-delivery (required on iOS 15 and watchOS 8 and later).
  • Info.plist: NSHealthShareUsageDescription, NSHealthUpdateUsageDescription, NSHealthClinicalHealthRecordsShareUsageDescription (key name from Xcode).
  • Availability: HKHealthStore.isHealthDataAvailable(). Auth: requestAuthorization(toShare:read:). authorizationStatus(for:) reports write access only.
  • Background: HKObserverQuery plus enableBackgroundDelivery(for:frequency:withCompletion:) with .immediate, .hourly, .daily or .weekly. Step count capped at hourly on iOS. Call the completion handler every time. Correlation types (blood pressure, food) are not supported. watchOS: 4 updates an hour with an active complication.
  • Sync: HKAnchoredObjectQuery for adds and deletes, HKStatisticsCollectionQuery for totals. Dedupe on sample UUID.
  • History: earliestPermittedSampleDate() (watch purge). iOS 27: getEarliestAuthorizedSampleDate(for:completion:).
  • Clinical records: HKClinicalTypeIdentifier allergyRecord, clinicalNoteRecord, conditionRecord, coverageRecord, immunizationRecord, labResultRecord, medicationRecord, procedureRecord, vitalSignRecord. HKFHIRVersion primaryDSTU2 and primaryR4. Resource JSON in fhirResource.data. Medication records can be MedicationStatement, MedicationOrder, MedicationRequest or MedicationDispense. SMART Health Cards via HKVerifiableClinicalRecord (iOS 15).
  • ECG: HKElectrocardiogram, voltages through HKElectrocardiogramQuery. Read only.
  • FHIR mapping (LOINC, every code below checked against the NLM LOINC search on 11 Nov 2026): heart rate 8867-4, resting heart rate 40443-4, HRV SDNN 80404-7, steps 41950-7 (daily), weight 29463-7, height 8302-2, BMI 39156-5, blood pressure panel 85354-9 (systolic 8480-6, diastolic 8462-4), SpO2 59408-5, respiratory rate 9279-1, body temperature 8310-5, glucose 2339-0 or 41653-7, sleep duration 93832-4. No clean LOINC code for ECG.
  • Aggregator background notes: Terra setUpBackgroundDelivery(), runs only when unlocked. Junction hourly batches. ROOK enableBackgroundSync. Spike iOS 15+, unlocked only. Sahha and Thryve mechanisms not published.

Sources

All read 10 Nov 2026.

  • https://developer.apple.com/documentation/healthkit/protecting-user-privacy
  • https://developer.apple.com/documentation/healthkit/about-the-healthkit-framework
  • https://developer.apple.com/documentation/healthkit/setting-up-healthkit
  • https://developer.apple.com/documentation/healthkit/authorizing-access-to-health-data
  • https://developer.apple.com/documentation/healthkit/accessing-health-records
  • https://developer.apple.com/documentation/healthkit/hkhealthstore/enablebackgrounddelivery(for:frequency:withcompletion:)
  • https://developer.apple.com/documentation/healthkit/hkhealthstore/authorizationstatus(for:)
  • https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier
  • https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier
  • https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifier
  • https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecord
  • https://developer.apple.com/app-store/review/guidelines/
  • https://developer.apple.com/support/terms/apple-developer-program-license-agreement/
  • https://developer.apple.com/help/account/membership/fee-waivers
  • https://developer.apple.com/programs/enterprise/
  • https://support.apple.com/en-us/111755
  • https://www.apple.com/newsroom/2020/10/health-records-on-iphone-available-today-in-the-uk-and-canada/
  • Vendor help pages for Oura, WHOOP, Fitbit, Dexcom, Withings, Polar, Strava, MyFitnessPal, Peloton, COROS, Ultrahuman, Eight Sleep (see our wearable research notes)
  • Aggregator docs: docs.tryterra.co, docs.junction.com, docs.tryrook.io, sahha.ai/docs, docs.spikeapi.com, docs.thryve.health

Ready to scale?

Talk to our healthcare engineering team about building, integrating, and shipping faster.

Frequently Asked Questions

Does Apple Health have an API I can call from my server?

No. Apple says the device stores all HealthKit data locally. You need your own iOS app that reads HealthKit on the phone and uploads the data to your server.

How much does the HealthKit API cost?

HealthKit is free. You need the Apple Developer Program at US$99 a year to ship on the App Store. Nonprofits, schools and government bodies can apply for a fee waiver.

Can my app tell if a user denied Apple Health read access?

No. Apple says that without read permission it simply appears as if there is no data. The authorization status only tells you about write access.

Can a HealthKit app sync data in the background?

Yes, with the background delivery entitlement and observer queries. Frequencies are immediate, hourly, daily or weekly, step count is limited to hourly on iOS, and reads can fail while the phone is locked.

Can I use Apple Health data for ads or sell it?

No. App Review Guideline 5.1.3 bans using HealthKit data for advertising, marketing or data mining, and the License Agreement bans selling it to ad platforms, data brokers or resellers.

Can I store HealthKit data in iCloud?

No. Guideline 5.1.3(ii) says apps may not store personal health information in iCloud. Store it on your own server with your own security controls.

Can I read clinical records from Apple Health?

Yes. With the Clinical Health Records capability your app can read nine record types, including labs, medications, conditions and immunizations, as FHIR DSTU2 or R4 resources. Apple's Health Records launched in the US, Canada and UK.

Is Apple HealthKit HIPAA compliant?

Apple does not publish a HIPAA stance or offer a BAA for HealthKit. HIPAA applies based on who runs the app. If you are a covered entity or business associate, your app and server must meet HIPAA.

How far back can I read Apple Health data?

Apple publishes no history cap on iPhone. From iOS 27, a user can choose to share only a recent window, and your app can read that date. Apple Watch purges old data, so read history from the iPhone.

Can I write ECG or AFib data to Apple Health?

No. Third-party apps can read Apple Watch ECG recordings, AFib burden and Walking Steadiness, but cannot write them.

Which wearables send data to Apple Health?

Vendor pages confirm Oura, WHOOP, Fitbit through the Google Health app, Dexcom, Withings, Polar, Strava, MyFitnessPal, Peloton, COROS, Ultrahuman and Eight Sleep. Garmin writes per third-party pages. FreeStyle Libre support is not published.

Can a wellness app give insurance discounts from HealthKit data?

Yes, under Guideline 5.1.3(i), if the app is submitted by the entity giving the benefit and the data is not shared with a third party.

Does HealthKit use OAuth scopes?

No. There are no tokens or scopes. Your app asks for each data type on an on-device permission sheet, and the user can allow or deny each type. Access lasts until the user changes it in Settings.

Does Apple Health send webhooks?

No. Nothing leaves the phone unless your app sends it. Use an observer query with background delivery to wake your app, then upload to your own server. Step count wakes your app at most once an hour on iOS.

How do I sync only new or deleted HealthKit data?

Use HKAnchoredObjectQuery. Each run returns new samples, deleted objects and a new anchor. Store the anchor and pass it next time to get only the changes since the last run.

What units does HealthKit return?

Every quantity carries an HKUnit, and you pick the unit when you read it. Convert once in the app and send one unit per type to your server.

Can I test HealthKit in the Simulator?

Partly. Apple says background server queries are not supported on the Simulator, so test background sync and locked-phone behavior on a real iPhone and Apple Watch.

Can my app read data while the iPhone is locked?

Often not. Apple encrypts the HealthKit store when the device locks, so background reads can fail until the user unlocks it. Queue uploads and retry after unlock.
Share