Help Center HealthyApps
English
Help Center
Main website ↗

Search help topics

Sync Apple Health Data to REST API

Send health data to a REST API endpoint.

Last updated: October 31, 2026

On this page
Open the automationName, status, and notificationsSet up the endpoint
Data Type Settings Data Type Settings Health metricsWorkouts
Export Settings Export Settings Export FormatExport VersionDate RangeSummarize Data and Time Grouping
Batch requests and large payloadsSchedule RemindersSync Frequency and saveRequest headersExport historical or missed dataTroubleshooting

Send health exports to an endpoint that accepts HTTP POST requests.

Important — automation limitations: Your device must be unlocked to read health data, and iOS does not guarantee background runs at your chosen frequency. Review Automation Limitations before relying on automatic exports.

Open the automation

Open Export → Automated on iPhone, or Automations in the iPad sidebar. Select New Automation, or open an existing automation to edit it.

Name, status, and notifications

Enter a name that identifies this automation. Enabled allows automatic runs; leave it off until you are ready.

Choose any run notifications you want:

  • Notify on Cache Update reports that export data was prepared.
  • Notify When Run reports a successful upload to your endpoint.

Allow notifications when prompted. These notifications report activity; they do not schedule a run.

Set up the endpoint

  1. Choose REST API as the Automation Type.
  2. Enter a URL reachable from your iPhone or iPad, such as https://api.example.com/health-data.
  3. Add any required authentication under HTTP Headers. For example, use Authorization as the key and Bearer YOUR_TOKEN as its value.
  4. Choose a Request Timeout appropriate for your endpoint.

Each header needs both a key and value. For a server on another device, use its reachable network address rather than localhost.

Data Type Settings

Select one Data Type for this automation: Health Metrics, Workouts, Symptoms, ECG, Heart Rate Notifications, State of Mind, Cycle Tracking, or Medications. State of Mind requires iOS 18 or later; Medications requires iOS 26 or later and separate medication access.

Health metrics

Choose Health Metrics, then open Select Health Metrics and select the measurements you need.

To limit readings to particular apps or devices, open Preferred Sources, choose a metric, and select its sources. All allows every source that has not been excluded. Use Excluded Sources to ignore a source across this automation’s health metrics. Exclusions take precedence; an unselected source is not substituted when a preferred source has no data. Select Save to apply the source choices or Cancel to discard them.

Workouts

Choose Workouts to export workout records. Include Route Data adds available route points to JSON workout data. It does not create separate GPX uploads.

For Version 2, turn on Include Workout Metrics to add readings such as heart rate, active energy, and steps. Choose Minutes or Seconds for workout-metric Time Grouping; seconds produce more detail and larger exports. Version 1 always includes workout metrics.

Export Settings

Export Format

  • JSON preserves structured data for integrations and analysis.
  • CSV creates tabular files for spreadsheets.
  • Markdown creates readable headings and tables for notes and archives.

Export Version

Choose Version 2 for the current data structure. Use Version 1 when an existing workflow depends on the older format.

Date Range

Selection Data included
Default The previous day and today up to the run time
Since Last Sync Since the previous sync up to the run time
Today Today up to the run time
Yesterday The previous full day
Previous 7 Days The previous seven full days

Summarize Data and Time Grouping

For JSON + Health Metrics, turn Summarize Data on to combine readings into time groups, or off for individual readings where available. The summary depends on the metric—for example, steps are totaled and weight readings are averaged. CSV health-metric exports use summarized data.

When Time Grouping is available, choose how much detail to keep. Hourly or daily groups produce fewer rows than minute or second groups. Available choices depend on the date range and format. Workout time grouping is configured separately under Workouts.

Batch requests and large payloads

For REST API + JSON, turn on Batch Requests to send data across multiple requests. Use this when your endpoint rejects large bodies or large requests time out. The receiving service must handle each request separately.

Batching is unavailable for CSV and Markdown. It reduces the size of individual requests but does not reduce the amount of health data the device needs to read. See Performance if preparation is slow.

Schedule Reminders

If you want a prompt to unlock and open the app, turn on Enable Reminders. Choose Hourly, Every Day, or Selected Days, then set the minute, time, and days as applicable. Allow notification access when prompted; if access is denied, use Open Notification Settings.

A reminder does not run the automation or confirm a successful sync. Tap it to open the automation, or use Open & Sync on the notification to request a run. The automation must be enabled; a reminder may still appear after a successful background run. Reminder changes apply when you save.

Sync Frequency and save

Choose a number and Minutes, Hours, Days, or Weeks under Sync Frequency—for example, every 15 minutes. This is a desired background cadence, not a guaranteed schedule.

Your device must be unlocked when health data is read. Enable Background App Refresh for Health Auto Export and turn off Low Power Mode for automatic runs. iOS may still delay runs when the device has been inactive or system resources are limited.

Turn on Enabled when you are ready for automatic runs, then select Update to save the automation. You can upload a selected date range immediately using the steps below.

Request headers

The app sets Content-Type for the chosen format and includes:

Header Meaning
automation-name Automation name
automation-id Automation identifier
automation-aggregation Selected time grouping
automation-period Selected date range
session-id Request identifier

Export historical or missed data

Use Manual Upload when you first set up the automation to export historical data, or later to cover dates missed by automatic syncing. You can also use it to check your setup.

  1. Open the automation and select Manual Upload under Export Existing Data.
  2. Set the Start and End dates, then select Begin Export.
  3. Check your endpoint’s received request, headers, and body.

Troubleshooting

  • No request received: Check the URL, network reachability, and server logs.
  • Authentication error: Check the header key, token, and endpoint permissions.
  • Payload rejected or timed out: Check the server’s size limits, use batching for JSON, or reduce the export size.

Open the automation and select View Activity Logs to review a run. Warnings flag potential issues such as slow data retrieval; errors identify failed steps. For help reporting an issue, see Getting Help.