Skip to main content

Progress

Health data

Daily steps, active calories, resting heart rate and sleep from Apple Health or Health Connect.

The daily health data a client's phone sends from Apple Health or Health Connect. The client's phone sends its data only while they have the HubFit app open, so the data is as recent as lastSyncedAt, and today's numbers grow until it next syncs. To compare clients' health data over a period, use GET /client-summaries with include=health.

Attributes

  • sourceenumnullable

    Where the data comes from, or null if the client hasn't connected Apple Health or Health Connect. New sources can appear.

    Known valuesapple_healthhealth_connect
  • lastSyncedAttimestampnullable
  • daysarray of objects
    Show 5 child attributes
    • datedate

      The day on the client's phone.

    • stepsintegernullable
    • activeCaloriesintegernullable

      Calories burned by activity, in kcal. Not total energy.

    • restingHeartRateBpmnumbernullable
    • sleepobjectnullable

      The night that ended this morning, or null.

      Show 7 child attributes
      • Time asleep, awake time not included.

      • deepSecondsintegernullable

        null if the phone recorded no sleep stages.

      • lightSecondsintegernullable

        Light sleep, which Apple Health calls core sleep. null if the phone recorded no sleep stages.

      • remSecondsintegernullable

        null if the phone recorded no sleep stages.

      • awakeSecondsintegernullable

        Time awake during the night. null if the phone recorded no sleep stages and no time awake.

      • startAttimestampnullable
      • endAttimestampnullable
Health data object
{
  "source": "apple_health",
  "lastSyncedAt": "2026-10-26T14:32:05.000Z",
  "days": [
    {
      "date": "2026-10-26",
      "steps": 9412,
      "activeCalories": 612,
      "restingHeartRateBpm": 57,
      "sleep": {
        "durationSeconds": 27300,
        "deepSeconds": 5400,
        "lightSeconds": 14400,
        "remSeconds": 6300,
        "awakeSeconds": 1200,
        "startAt": "2026-10-25T23:05:00.000Z",
        "endAt": "2026-10-26T06:40:00.000Z"
      }
    }
  ]
}
GET/v1/clients/{clientId}/health-data

The client's daily health data from Apple Health or Health Connect, newest day first. Days with no data are left out. The client's phone sends its data only while they have the HubFit app open, so the data is as recent as lastSyncedAt, and today's numbers grow until it next syncs. A client who switched phones has data from both; this is the one that synced last. Requires clients:read.

Path parameters

Query parameters

  • startDatedateRequired

    The first day, included, as YYYY-MM-DD.

  • endDatedateRequired

    The last day, included, as YYYY-MM-DD. The period is at most 90 days, counting both ends.

Returns

The client's health data.

GET /v1/clients/{clientId}/health-data
curl -G https://api.hubfit.com/v1/clients/6ad6af41d3199442d31b2743/health-data \
  -H "Authorization: Bearer $HUBFIT_API_KEY" \
  -d startDate=2026-10-20 \
  -d endDate=2026-10-26
Response200 OK
{
  "data": {
    "source": "apple_health",
    "lastSyncedAt": "2026-10-26T14:32:05.000Z",
    "days": [
      {
        "date": "2026-10-26",
        "steps": 9412,
        "activeCalories": 612,
        "restingHeartRateBpm": 57,
        "sleep": {
          "durationSeconds": 27300,
          "deepSeconds": 5400,
          "lightSeconds": 14400,
          "remSeconds": 6300,
          "awakeSeconds": 1200,
          "startAt": "2026-10-25T23:05:00.000Z",
          "endAt": "2026-10-26T06:40:00.000Z"
        }
      }
    ]
  }
}