GET
/
v2
/
summary
/
sleep
/
{user_id}
curl --request GET \
     --url {{BASE_URL}}/v2/summary/sleep/{user_id}?start_date={{START_DATE}}&end_date={{END_DATE}} \
     --header 'Accept: application/json' \
     --header 'x-vital-api-key: <API_KEY>'
{
  "sleep": [
    {
      "id": "6f9d156f-a497-47b2-b940-d13771c7c937",
      "calendar_date": "2022-08-04",
      "bedtime_start": "2022-08-04T12:42:45.724597+00:00",
      "bedtime_stop": "2022-08-04T12:42:45.724600+00:00",
      "timezone_offset": 2400,
      "duration": 28800,
      "total": 28800,
      "awake": 2400,
      "light": 2400,
      "rem": 2400,
      "deep": 2400,
      "hr_lowest": 43,
      "hr_average": 50,
      "hr_dip": 19.7,
      "efficiency": 0.97,
      "latency": 1000,
      "temperature_delta": -0.2,
      "average_hrv": 78,
      "respiratory_rate": 14,
      "source": {
        "name": "Oura",
        "slug": "oura",
        "logo": "https://logo_url.com"
      },
      "user_id": "1ede2505-5ba1-41d2-a1a5-ed6887198fa4"
    }
  ]
}

Authorizations

x-vital-api-key
string
headerrequired

API key based authentication

Path Parameters

user_id
string
required

Query Parameters

provider
string
default:

Provider oura/strava etc

start_date
string
required

Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00

end_date
string

Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59

Response

200 - application/json
sleep
object[]
required