Summaries
daily.data.sleep.updated

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_typerequired
const string

Constant: daily.data.sleep.updated

datarequired
ClientFacingSleep
user_idrequired
string

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.

user_key
string | null

[⚠️ Deprecated] User key returned by vital create user key request. This key should be stored in your database against the user and used for all interactions with the vital api.

idrequired
string
daterequired
string

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

calendar_daterequired
string

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

bedtime_startrequired
string

UTC Time when the sleep period started

bedtime_stoprequired
string

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

durationrequired
integer

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

totalrequired
integer

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

awakerequired
integer

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

lightrequired
integer

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

remrequired
integer

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

deeprequired
integer

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

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

sourcerequired
ClientFacingSource

Source the data has come from.

namerequired
string

Name of source of information

slugrequired
string

Slug for designated source

logorequired
string

URL for source logo

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

Measurement id. Note, this field has been deprecated and is no longer used

timestamprequired
string

The timestamp of the measurement.

timezone_offset
integer | null

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

valuerequired
number

HRV calculated using rmssd during sleep

type
string | null

The reading type of the measurement, e.g. cuff, scale, manual_scan, etc.

unitrequired
string

Measured in rmssd.

heartrate
ClientFacingHeartRateTimeseries[] | null
id
integer | null

Measurement id. Note, this field has been deprecated and is no longer used

timestamprequired
string

The timestamp of the measurement.

timezone_offset
integer | null

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

valuerequired
number

Heart rate in bpm

type
string | null

The reading type of the measurement, e.g. cuff, scale, manual_scan, etc.

unitrequired
string

Measured in bpm.

hypnogram
ClientFacingHypnogramTimeseries[] | null
id
integer | null

Measurement id. Note, this field has been deprecated and is no longer used

timestamprequired
string

The timestamp of the measurement.

timezone_offset
integer | null

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

valuerequired
number

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

type
string | null

The reading type of the measurement, e.g. cuff, scale, manual_scan, etc.

unitrequired
string

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

respiratory_rate
ClientFacingRespiratoryRateTimeseries[] | null
id
integer | null

Measurement id. Note, this field has been deprecated and is no longer used

timestamprequired
string

The timestamp of the measurement.

timezone_offset
integer | null

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

valuerequired
number

Average respiratory rate::breaths per minute

type
string | null

The reading type of the measurement, e.g. cuff, scale, manual_scan, etc.

unitrequired
string

Measured in bpm.

Examples

{
  "event_type": "daily.data.sleep.updated",
  "data": {
    "id": "ba3b6572-2348-478d-91a0-9c7e07a7a38c",
    "date": "2023-05-26T20:56:49.395792+00:00",
    "calendar_date": "2023-05-26",
    "bedtime_start": "2023-05-26T20:56:49.395808+00:00",
    "bedtime_stop": "2023-05-26T20:56:49.395812+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": {
      "name": "Oura",
      "slug": "oura",
      "logo": "https://logo_url.com"
    },
    "user_id": "b389d7e3-1968-408e-a678-bd18b63e7f7c"
  }
}