Register Apple Health
Changed onRegister Apple Health as the user's health data provider.
Apple Health has no OAuth flow — the mobile client calls this endpoint after the user grants HealthKit permissions. device_uuid is an opaque identifier persisted in the iCloud-synced Keychain, so it can survive reinstalls and arrive on another phone through iCloud. login_only=True returns 404 for an unknown UUID without creating a user, provider link, or phone key. Omitting it preserves new connections. Branch behavior mirrors the OAuth callback; see _link_provider_identity.
Device timezone arrives via the X-Device-Timezone header (validated by the device_timezone dependency) so the auto-created User on the anonymous-onboarding branch lands with the caller's real IANA timezone instead of the User.create default of "UTC". Mirrors the Garmin OAuth callback path landed in #689 — required so mobile can drop its preemptive POST /users priming call (#541) and let the recovery branch of _link_provider_identity fire (#711).
Request
- Base URLhttps://api.imperfect.co (the document declares no server; this is the origin it was published from)
- URLhttps://api.imperfect.co/health-providers/apple-health/register
- AuthHTTP bearer
Query parameters
Recover an existing Apple identity, or return 404 without creating one.
Headers
Request body
Response
Successful Response
Changes
- info
added the new optional
queryrequest parameterlogin_only
- info
- info
added the new optional
headerrequest parameterx-client-platform - info
added the new optional
headerrequest parameterx-device-hint
- info