v3

latestOpenAPI 3.1.02026-07-31121144224.9 KB
External: Summaries

Get Sleep Summary

Returns daily sleep metrics.

get/api/v1/users/{user_id}/summaries/sleep

Path parameters

user_idstring uuid required

Query parameters

start_datestring date-time required

ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and normalized to midnight UTC.

Example:2023-11-07T05:31:56Z

ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and normalized to midnight UTC.

end_datestring date-time required

ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and normalized to midnight UTC.

Example:2023-11-07T05:31:56Z

ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and normalized to midnight UTC.

cursorstring nullable
limitinteger

Headers

X-Open-Wearables-API-Keystring nullable

Response

Successful Response

Example response

{
  "data": [
    {
      "source": {
        "provider": "apple_health",
        "device": "Apple Watch Series 9"
      },
      "duration_minutes": 450,
      "total_duration_minutes": 480,
      "time_in_bed_minutes": 480,
      "efficiency_percent": 89.5,
      "nap_count": 1,
      "nap_duration_minutes": 30,
      "sessions": [
        {
          "duration_minutes": 420
        }
      ]
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6IjEyMzQ1Njc4OTAiLCJ0cyI6MTcwNDA2NzIwMH0",
    "total_count": 150
  }
}