v3
latestOpenAPI 3.1.02026-07-31121144224.9 KBExternal: Mobile SDK
Sync Sdk Data
Import health data from SDK provider asynchronously via Celery.
Supports Apple HealthKit and Samsung Health SDK formats (identical payloads):
{
"provider": "apple",
"sdkVersion": "1.0.0",
"syncTimestamp": "2021-01-01T00:00:00Z",
"data": {
"records": [...],
"sleep": [...],
"workouts": [...]
}
}
Args: user_id: SDK user identifier body: Health data payload auth: SDK authentication (Bearer token or API key)
Returns: UploadDataResponse with 202 status and task queued message
Raises: HTTPException: 403 if token doesn't match user_id, 400 if provider unsupported. Payload validation runs async in the worker, not here.
post/api/v1/sdk/users/{user_id}/sync
Path parameters
user_idstring required
Headers
X-Open-Wearables-API-Keystring nullable
Request body
Example request
{
"data": {
"records": [
{
"endDate": "2026-02-24T08:30:00Z",
"id": "abc-xyz-123-sys",
"parentId": "abc-xyz-123",
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"startDate": "2026-02-24T08:30:00Z",
"type": "BLOOD_PRESSURE_SYSTOLIC",
"unit": "mmHg",
"value": 122,
"zoneOffset": "+01:00"
}
],
"sleep": [
{
"endDate": "2026-02-24T00:00:00Z",
"id": "slp-001-s0-0",
"parentId": "slp-001",
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"stage": "light",
"startDate": "2026-02-23T23:10:00Z",
"values": [
{
"type": "sleepScore",
"unit": "score",
"value": 82
}
],
"zoneOffset": "+01:00"
}
],
"workouts": [
{
"endDate": "2026-02-24T06:45:00Z",
"id": "wrk-001-s0",
"notes": "Morning run in the park",
"parentId": "wrk-001",
"route": [
{
"altitudeM": 142,
"horizontalAccuracyM": 3.5,
"latitude": 52.229676,
"longitude": 21.012229,
"timestamp": "2026-02-24T06:01:00Z"
}
],
"samples": [
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "heartRate",
"unit": "bpm",
"value": 110
},
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "cadence",
"unit": "spm",
"value": 155
},
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "speed",
"unit": "m/s",
"value": 1.8
}
],
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"startDate": "2026-02-24T06:00:00Z",
"type": "RUNNING",
"values": [
{
"type": "duration",
"unit": "ms",
"value": 2700000
},
{
"type": "calories",
"unit": "kcal",
"value": 345.5
},
{
"type": "distance",
"unit": "m",
"value": 5234
},
{
"type": "meanHeartRate",
"unit": "bpm",
"value": 142.3
},
{
"type": "maxHeartRate",
"unit": "bpm",
"value": 178
},
{
"type": "minHeartRate",
"unit": "bpm",
"value": 95
},
{
"type": "meanSpeed",
"unit": "m/s",
"value": 1.5
},
{
"type": "maxSpeed",
"unit": "m/s",
"value": 3.2
},
{
"type": "meanCadence",
"unit": "spm",
"value": 165
},
{
"type": "maxCadence",
"unit": "spm",
"value": 182
},
{
"type": "altitudeGain",
"unit": "m",
"value": 45
},
{
"type": "altitudeLoss",
"unit": "m",
"value": 42
},
{
"type": "maxAltitude",
"unit": "m",
"value": 185
},
{
"type": "minAltitude",
"unit": "m",
"value": 140
},
{
"type": "vo2Max",
"unit": "mL/kg/min",
"value": 42.5
}
],
"zoneOffset": "+01:00"
}
]
},
"provider": "samsung",
"sdkVersion": "0.1.0",
"syncTimestamp": "2026-02-24T10:00:00Z"
}Response
Successful Response