health-providers

Register Apple Health

Register 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 survives reinstalls on the same Apple ID. 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).

post/health-providers/apple/register

Headers

x-device-timezonestring nullable

Request body

device_uuidstring required

Opaque device identifier persisted in iCloud-synced Keychain on the mobile side. Used as the Apple Health provider_user_id.

Response

Successful Response

provider'garmin' | 'whoop' | 'coros' | 'terra' | 'apple_health' required

Health data providers (OAuth connections).

provider_user_idstring required
permissionsstring[] required
status'active' | 'expired' | 'revoked' | 'error' required

Status of a health provider connection.

result'connected' | 'already_connected' | 'recovered'
custom_tokenstring nullable

Changes

No recorded changes to this endpoint across all 4 revisions of this API.