Skip to main content
POST
/
api
/
v1
/
sdk
/
users
/
{user_id}
/
sync
Sync Sdk Data
curl --request POST \
  --url https://api.example.com/api/v1/sdk/users/{user_id}/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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"
}
'
{
  "status_code": 123,
  "response": "<string>",
  "user_id": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Open-Wearables-API-Key
string | null

Path Parameters

user_id
string
required

Body

application/json

Schema for Apple HealthKit data import via SDK.

This schema represents the structure of health data exported from Apple HealthKit and sent to the SDK sync endpoint. The data is processed asynchronously via Celery.

Structure:

  • data.records: Time-series measurements (heart rate, steps, distance, etc.)
  • data.sleep: Sleep phase records (in bed, awake, light, deep, REM)
  • data.workouts: Exercise/workout sessions with statistics

All fields within data are optional - you can send any combination of records, sleep, and workouts.

provider
string
required
sdkVersion
string
required
syncTimestamp
string<date-time>
required
data
SyncRequestData · object

Container for health data arrays (records, sleep, workouts)

Response

Successful Response

Response schema for data upload/sync operations.

Returned when health data is queued for asynchronous processing via Celery. The actual import happens in the background - this response indicates the task was queued successfully.

status_code
integer
required

HTTP status code (typically 202 for async operations)

response
string
required

Human-readable response message

user_id
string | null

User ID associated with the import operation