Sleep Routes

Single Sleep Document

get/v2/usercollection/sleep/{document_id}

Path parameters

document_idstring required

Response

Successful Response

idstring required

Unique identifier of the object.

average_breathnumber nullable

Average breathing rate during sleep as breaths/minute.

average_heart_ratenumber nullable

Average heart rate during sleep as beats/minute. NOTE: this is the average calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the average of aggregated 5-minute heart rate samples.

average_hrvinteger nullable

Average heart rate variability during sleep.

awake_timeinteger nullable

Duration spent awake in seconds.

bedtime_endstring required
bedtime_startstring required
daystring required
deep_sleep_durationinteger nullable

Duration spent in deep sleep in seconds.

efficiencyinteger nullable

Sleep efficiency rating in range [1, 100].

latencyinteger nullable

Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.

light_sleep_durationinteger nullable

Duration spent in light sleep in seconds.

low_battery_alertboolean required

Flag indicating if a low battery alert occurred.

lowest_heart_rateinteger nullable

Lowest heart rate during sleep. NOTE: this is the value calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the minimum of aggregated 5-minute heart rate samples.

movement_30_secstring nullable

30-second movement classification for the period where every character corresponds to: '1' = no motion, '2' = restless, '3' = tossing and turning '4' = active Example: "1143222134".

periodinteger required

ECore sleep period identifier.

readiness_score_deltainteger nullable

Effect on readiness score caused by this sleep period.

rem_sleep_durationinteger nullable

Duration spent in REM sleep in seconds.

restless_periodsinteger nullable

Number of restless periods during sleep.

sleep_algorithm_version'v1' | 'v2'

Oura Sleep Staging Algorithms. v1 = original aka legacy aka OSSA 1.0, v2 = latest sleep algorithm

sleep_analysis_reason'foreground_sleep_analysis' | 'bedtime_edit' | 'background_sleep_analysis' | 'background_created_foreground_updated'

Possible sleep analysis reasons.

sleep_phase_30_secstring nullable

30-second sleep phase classification for the period where every character corresponds to: '1' = deep sleep, '2' = light sleep, '3' = REM sleep '4' = awake. Example: "444423323441114".

sleep_phase_5_minstring nullable

5-minute sleep phase classification for the period where every character corresponds to: '1' = deep sleep, '2' = light sleep, '3' = REM sleep '4' = awake. Example: "444423323441114".

sleep_score_deltainteger nullable

Effect on sleep score caused by this sleep period.

time_in_bedinteger required

Duration spent in bed in seconds.

total_sleep_durationinteger nullable

Total sleep duration in seconds.

type'deleted' | 'sleep' | 'long_sleep' | 'late_nap' | 'rest'

Possible sleep period types. 'deleted' = deleted sleep by user. 'sleep' = user confirmed sleep / nap, min 15 minutes, max 3 hours, contributes to daily scores 'late_nap' = user confirmed sleep / nap, min 15 minutes, ended after sleep day change (6 pm), contributes to next days daily scores 'long_sleep' = sleep that is long enough (>3h) to automatically contribute to daily scores 'rest' = Falsely detected sleep / nap, rejected in confirm prompt by user

ring_idstring nullable

Encrypted identifier of the ring that produced this sleep data.

app_sleep_phase_5_minstring nullable
    5-minute sleep phase classification for the period aligned with what is shown in the app
    where every character corresponds to:
    '1' = deep sleep,
    '2' = light sleep,
    '3' = REM sleep
    '4' = awake.
    Example: "444423323441114".
    NOTE: This field will be removed in the future after a transition period.
    

Changes