{
  "event_type": "daily.data.sleep.created",
  "team_id": "e89cc9fe-e1c0-41bc-a83a-728b8cb1056f",
  "user_id": "fac593ed-f371-4aea-9210-9332f1b19bec",
  "client_user_id": "3Zru4O8cBEiwGTsXgUQGaQ==",
  "data": {
    "id": "f615077d-83dd-4500-86da-5cf5de1ffe08",
    "date": "2024-05-17T18:22:39+00:00",
    "calendar_date": "2024-05-17",
    "bedtime_start": "2024-05-17T18:22:39+00:00",
    "bedtime_stop": "2024-05-17T18:22:39+00:00",
    "timezone_offset": 2400,
    "duration": 28800,
    "total": 28800,
    "awake": 2400,
    "light": 2400,
    "rem": 2400,
    "deep": 2400,
    "hr_lowest": 43,
    "hr_average": 50,
    "efficiency": 0.97,
    "latency": 1000,
    "temperature_delta": -0.2,
    "skin_temperature": 36.5,
    "average_hrv": 78,
    "respiratory_rate": 14,
    "source": {
      "provider": "oura",
      "type": "unknown",
      "app_id": null
    },
    "user_id": "a3233612-6211-475d-b0d8-7f851a428042"
  }
}

Each summary object is uniquely identified by its id.

If multiple events are received at the same id, the last event received replaces all its previous versions.

Properties

event_type
const string
required

Constant: daily.data.sleep.created

team_id
string
required
user_id
string
required
client_user_id
string
required
data
ClientFacingSleep
required
user_id
string
required

User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api.

id
string
required
date
string
required

[⚠️ Deprecated] Date of the specified record, formatted as ISO8601 datetime string in UTC 00:00. Deprecated in favour of calendar_date.

calendar_date
string
required

Date of the sleep summary in the YYYY-mm-dd format. This generally matches the sleep end date.

bedtime_start
string
required

UTC Time when the sleep period started

bedtime_stop
string
required

UTC Time when the sleep period ended

timezone_offset
integer | null

Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds

duration
integer
required

Total duration of the sleep period (sleep.duration = sleep.bedtime_end - sleep.bedtime_start)::seconds

total
integer
required

Total amount of sleep registered during the sleep period (sleep.total = sleep.rem + sleep.light + sleep.deep)::seconds

awake
integer
required

Total amount of awake time registered during the sleep period::seconds

light
integer
required

Total amount of light sleep registered during the sleep period::seconds

rem
integer
required

Total amount of REM sleep registered during the sleep period, minutes::seconds

deep
integer
required

Total amount of deep (N3) sleep registered during the sleep period::seconds

score
integer | null

A value between 1 and 100 representing how well the user slept. Currently only available for Withings, Oura, Whoop and Garmin::scalar

hr_lowest
integer | null

The lowest heart rate (5 minutes sliding average) registered during the sleep period::beats per minute

hr_average
integer | null

The average heart rate registered during the sleep period::beats per minute

efficiency
number | null

Sleep efficiency is the percentage of the sleep period spent asleep (100% * sleep.total / sleep.duration)::perc

latency
integer | null

Detected latency from bedtime_start to the beginning of the first five minutes of persistent sleep::seconds

temperature_delta
number | null

Skin temperature deviation from the long-term temperature average::celcius

skin_temperature
number | null

The skin temperature::celcius

hr_dip
number | null

Sleeping Heart Rate Dip is the percentage difference between your average waking heart rate and your average sleeping heart rate. In health studies, a greater “dip” is typically seen as a positive indicator of overall health. Currently only available for Garmin::perc

average_hrv
number | null

The average heart rate variability registered during the sleep period::rmssd

respiratory_rate
number | null

Average respiratory rate::breaths per minute

source
ClientFacingSource
required

Source the data has come from.

provider
string
required

Provider slug. e.g., oura, fitbit, garmin.

type
string | null

The type of the data source (app or device) by which the summary or the timeseries data were recorded. This defaults to unknown when Vital cannot extract or infer that information

app_id
string | null

The identifier of the app which recorded this summary. This is only applicable to multi-source providers like Apple Health and Android Health Connect.

name
string
required

[⚠️ Deprecated] Deprecated. Subject to removal after 1 Jan 2024.

slug
string
required

[⚠️ Deprecated] Deprecated. Use provider instead. Subject to removal after 1 Jan 2024.

logo
string
required

[⚠️ Deprecated] Deprecated. Subject to removal after 1 Jan 2024.

sleep_stream
ClientFacingSleepStream | null
hrv
ClientFacingHRVTimeseries[] | null
id
integer | null

Deprecated

timezone_offset
integer | null

Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.

type
string | null

The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.

unit
string
required

Measured in rmssd.

timestamp
string
required

The timestamp of the measurement.

value
number
required

HRV calculated using rmssd during sleep

heartrate
ClientFacingHeartRateTimeseries[] | null
id
integer | null

Deprecated

timezone_offset
integer | null

Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.

type
string | null

The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.

unit
string
required

Measured in bpm.

timestamp
string
required

The timestamp of the measurement.

value
number
required

Heart rate in bpm

hypnogram
ClientFacingHypnogramTimeseries[] | null
id
integer | null

Deprecated

timezone_offset
integer | null

Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.

type
string | null

The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.

unit
string
required

enum: 1: deep, 2: light, 3: rem, 4: awake, -1: missing_data.

timestamp
string
required

Depracated. The start time (inclusive) of the interval.

start
string
required

The start time (inclusive) of the interval.

end
string
required

The end time (exclusive) of the interval.

value
number
required

Hypnogram for sleep stages {“deep”: 1, “light”: 2, “rem”: 3, “awake”: 4, “manual”: 5, “missing_data”: -1}

respiratory_rate
ClientFacingRespiratoryRateTimeseries[] | null
id
integer | null

Deprecated

timezone_offset
integer | null

Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.

type
string | null

The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.

unit
string
required

Measured in bpm.

timestamp
string
required

The timestamp of the measurement.

value
number
required

Average respiratory rate::breaths per minute