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": [
    {
      "average_hrv": 78,
      "awake": 2400,
      "bedtime_start": "2023-02-27T12:31:24+00:00",
      "bedtime_stop": "2023-02-27T12:31:24+00:00",
      "calendar_date": "2023-02-27",
      "date": "2023-02-27T12:31:24+00:00",
      "deep": 2400,
      "duration": 28800,
      "efficiency": 0.97,
      "hr_average": 50,
      "hr_lowest": 43,
      "id": "e2e0eb04-6641-4858-9de5-649efb41b346",
      "latency": 1000,
      "light": 2400,
      "rem": 2400,
      "respiratory_rate": 14,
      "skin_temperature": 36.5,
      "source": {
        "provider": "oura",
        "type": "unknown"
      },
      "temperature_delta": -0.2,
      "timezone_offset": 2400,
      "total": 28800,
      "user_id": "1449752e-0d8a-40e0-9206-91ab099b2537"
    }
  ]
}
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>'

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

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 | null

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
Successful Response
sleep
object[]
required