Sync via REST API / Webhook

POST your Apple Health data as a structured JSON payload to any HTTP endpoint. Works with custom backends, n8n, Make, Zapier, or any service that accepts a webhook.

Prerequisites

  • Health Data Export app (iPhone)
  • An HTTP endpoint that accepts POST/PUT/PATCH requests (your own server, n8n webhook, Make webhook, etc.)

Setup

  1. Open the app → Settings → Sync
  2. Tap the provider selector and choose REST API
  3. Enter your endpoint URL (e.g. https://your-server.com/api/health or an n8n webhook URL)
  4. Choose HTTP method: POST, PUT, or PATCH
  5. Choose auth mode: None, Bearer Token, or Basic Auth — fill in credentials if needed
  6. Add any custom headers (e.g. X-Api-Key: your-key)
  7. Enable Auto-Sync and choose your interval

Payload Format

The app sends a application/json body using the ai-preset-v1 compact format. Here is a representative payload structure:

{
  "formatVersion": "ai-preset-v1",
  "preset": { "id": "webhook_compact" },
  "sections": {
    "steps": {
      "summary": "Avg 8,432 steps/day over 30 days",
      "days": [{ "date": "2026-04-12", "value": 9201 }, "..."]
    },
    "sleep": {
      "summary": "Avg 7.2h/night, 22% deep sleep",
      "diagnostics": ["Consistent bedtime variance < 30 min"],
      "days": [{ "date": "2026-04-12", "duration_h": 7.4 }, "..."]
    },
    "workouts": {
      "summary": "14 workouts in 30 days",
      "days": ["..."]
    },
    "resting_heart_rate": {
      "summary": "Avg 58 bpm, trending down",
      "days": ["..."]
    },
    "hrv": {
      "summary": "Avg 42ms SDNN",
      "days": ["..."]
    }
  }
}

Auth Modes

Mode When to use
None Local n8n, internal endpoints with no auth
Bearer Token Most APIs — sends Authorization: Bearer <token> header
Basic Auth Servers using HTTP basic auth (username + password)

n8n / Make Integration

For n8n, create a Webhook node and copy its URL as the endpoint. Set auth to None for local n8n instances. The payload arrives as the request body — use a Set node or Function node to extract fields and route to a database, Slack, or anywhere else.

Troubleshooting

  • No response / timeout — Check the endpoint is reachable from your iPhone. Local URLs only work on the same network.
  • 401 / 403 — Check your Bearer token or Basic Auth credentials.
  • Payload not received — Make sure the endpoint accepts Content-Type: application/json and the method matches (POST vs PUT).
  • SSL error — iOS requires HTTPS. Self-signed certs are rejected; use a trusted certificate.

See also: REST API setup guide, Local API Reference, and Workflows & Automation.