---
title: "Sleep v2 - Getsummary"
method: POST
path: "https://wbsapi.withings.net/v2/sleep "
tags: ["sleep"]
---

# Sleep v2 - Getsummary

`POST https://wbsapi.withings.net/v2/sleep `

## Request

- Base URL: `https://wbsapi.withings.net`
- URL: `https://wbsapi.withings.net/https://wbsapi.withings.net/v2/sleep `
- Auth: none declared. Required headers: `Authorization`

Returns sleep activity summaries, which are an aggregation of all the data captured at high frequency during the sleep activity.</br></br>
Use the [Sleep v2 - Get](#operation/sleepv2-get) service to get the high frequency data used to build these summaries.</br></br>
**IMPORTANT**: Please refer to this [page](https://developer.withings.com/developer-guide/v3/data-api/all-available-health-data/#sleep) to check the availability of metrics based on the sleep tracking device used. Some data types are regulated in the EU and US and may not be available in your region.

## Query parameters

- `action` string, required
- `startdateymd` string, required
- `enddateymd` string, required
- `lastupdate` integer, required
- `data_fields` string

## Headers

- `Authorization` string, required

## Response `200`

(Click to unfold)

- object
  - `status` integer: Response status. See <a href='#tag/response_status'>Status</a> section for details.
  - `body` object: Response data.
    - `series` SleepSummaryObject[]
      - `id` integer
      - `timezone` string: Timezone for the date.
      - `model` integer: The source for sleep data. Value can be 16 for a tracker or 32 for a Sleep Monitor.
      - `model_id` integer: | Value | Description| |---|---| |60 | Aura Dock| |61 | Aura Sensor| |63 | Aura Sensor V2| |51 | Pulse| |52 | Activite| |53 | Activite (Pop, Steel)| |54 | Withings Go| |55 | Activite Steel HR| |59 | Activite Steel HR Sport Edition| |58 | Pulse HR| |90 | Move| |91 | Move ECG| |92 | Move ECG| |93 | ScanWatch| |94 | ScanWatch 2| |95 | ScanWatch Light|
      - `startdate` integer: The starting datetime for the sleep state data.
      - `enddate` integer: The end datetime for the sleep data. A single call can span up to 7 days maximum. To cover a wider time range, you will need to perform multiple calls.
      - `date` string: Date at which the measure was taken or entered.
      - `created` integer
      - `modified` integer: The timestamp of the last modification.
      - `hash_deviceid` string: ID of device that tracked the data. To retrieve information about this device, refer to : <a href='/api-reference/#operation/userv2-getdevice'>User v2 - Getdevice</a>.
      - `completed` boolean
      - `data` object: Details of sleep.
        - `total_timeinbed` integer: Total time spent in bed (seconds). *(Use 'data_fields' to request this data.)*
        - `total_sleep_time` integer: Total time spent asleep. Sum of light, deep and rem durations (seconds). *(Use 'data_fields' to request this data.)*
        - `asleepduration` integer: Duration of sleep when night comes from external source (seconds).<br>Light, Deep and Rem sleep durations are null in this case. *(Use 'data_fields' to request this data.)*
        - `lightsleepduration` integer: Duration in state light sleep (seconds). *(Use 'data_fields' to request this data.)*
        - `remsleepduration` integer: Duration in state REM sleep (seconds). *(Use 'data_fields' to request this data.)*
        - `deepsleepduration` integer: Duration in state deep sleep (seconds). *(Use 'data_fields' to request this data.)*
        - `sleep_efficiency` number: Ratio of the total sleep time over the time spent in bed. *(Use 'data_fields' to request this data.)*
        - `sleep_latency` integer: Time spent in bed before falling asleep (seconds). *(Use 'data_fields' to request this data.)*
        - `wakeup_latency` integer: Time spent in bed after waking up (seconds). *(Use 'data_fields' to request this data.)*
        - `wakeupduration` integer: Time spent awake (seconds). *(Use 'data_fields' to request this data.)*
        - `wakeupcount` integer: Number of times the user woke up while in bed. Does not include the number of times the user got out of bed. *(Use 'data_fields' to request this data.)*
        - `waso` integer: Time spent awake in bed after falling asleep for the 1st time during the night (seconds). *(Use 'data_fields' to request this data.)*
        - `nb_rem_episodes` integer: Count of the REM sleep phases. *(Use 'data_fields' to request this data.)*
        - `durationtosleep` integer: Time to sleep (seconds). (deprecated) *(Use 'data_fields' to request this data.)*
        - `durationtowakeup` integer: Time to wake up (seconds). (deprecated) *(Use 'data_fields' to request this data.)*
        - `out_of_bed_count` integer: Number of times the user got out of bed during the night. *(Use 'data_fields' to request this data.)*
        - `hr_average` integer: Average heart rate. (beats per minute).*(Use 'data_fields' to request this data.)*
        - `hr_min` integer: Minimal heart rate (beats per minute). *(Use 'data_fields' to request this data.)*
        - `hr_max` integer: Maximal heart rate (beats per minute).. *(Use 'data_fields' to request this data.)*
        - `rr_average` integer: Average respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `rr_min` integer: Minimal respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `rr_max` integer: Maximal respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `breathing_quality_assessment` integer: Intensity of <a href='/api-reference/#section/Glossary'>breathing disturbances</a>.<br>Available for all Sleep and Sleep Analyzer devices (wellness metric).
        - `breathing_disturbances_intensity` integer: Intensity of <a href='/api-reference/#section/Glossary'>breathing disturbances</a>.<br>Available for all Sleep and Sleep Analyzer devices (wellness metric).
        - `snoring` integer: Total snoring time (seconds).
        - `snoringepisodecount` integer: Numbers of snoring episodes of at least one minute.
        - `sleep_score` integer: Sleep score
        - `night_events` unknown[]: Summary of sleep events that happened during the sleep activity. It is structured as a dictionary, where keys are the type of event, and the value is an array of time offsets in seconds. Within each array, the first offset is counted from the activity startdate, and every following offset is counted from the previous event of the same type. To obtain absolute timestamps, accumulate the offsets of each array separately, starting from startdate. For example, with a startdate of 1758000000, "4":[4860,11640] describes two events: the first at 1758004860, the second at 1758016500 (4860 + 11640 = 16500 seconds after startdate). Types of events can be one of the following : <table><thead><tr><td>Value</td><td>Description</td></tr></thead><tbody><tr><td>1</td><td>got in bed</td></tr><tr><td>2</td><td>fell asleep</td></tr><tr><td>3</td><td>woke up</td></tr><tr><td>4</td><td>got out of bed</td></tr><tr><td>5</td><td>start of asleep period that was manually input</td></tr><tr><td>6</td><td>start of awake period that was manually input</td></tr></tbody></table>
          - unknown
        - `apnea_hypopnea_index` integer: Medical grade AHI. Average number of hypopnea and apnea episodes per hour, that occured during sleep time.<br>Only available for devices purchased in Europe and Australia, with the sleep apnea detection feature activated.
        - `mvt_score_avg` integer: Track the average movement score in bed throughout the night. The score ranges from 0 to 255, representing the intensity of movement. This metric is only available for Sleep Analyzer devices in the EU and prescription-based devices in the US (Sleep Rx).
        - `mvt_active_duration` integer: Track the duration (in seconds) of movement in bed. Only available for Sleep Analyzer devices (EU) and devices under prescriptions in the US (Sleep Rx)
        - `rmssd_start_avg` number: Heart rate variability - Start average
        - `rmssd_end_avg` number: Heart rate variability - End average
        - `chest_movement_rate_wellness_average` integer: Average respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `chest_movement_rate_wellness_min` integer: Minimal respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `chest_movement_rate_wellness_max` integer: Maximal respiration rate (breaths per minute). *(Use 'data_fields' to request this data.)*
        - `withings_index` integer: Withings Sleep Rx (FDA Cleared) allows to estimate gaps in breathing sounds and to generate an index. This index corresponds to the number of breathing events per hour. <table><thead><tr><td>Value</td><td>Description</td></tr></thead><tbody><tr><td>0-15 (events per hour on average)</td><td>No/Mild</td></tr><tr><td>15-30 (events per hour on average)</td><td>Moderate</td></tr><tr><td>> 30 (events per hour on average)</td><td>Severe</td></tr></tbody></table> Note: 5 hours of sleep are required in order to calculate the Withings Index.
        - `breathing_sounds` integer: Total time when breathing sounds were tracked. (seconds) *(Use 'data_fields' to request this data.)*
        - `breathing_sounds_episode_count` integer: Numbers of breathing sounds episodes of at least one minute. *(Use 'data_fields' to request this data.)*
        - `chest_movement_rate_average` integer: Average chest movement rate (events per minute). *(Use 'data_fields' to request this data.)*
        - `chest_movement_rate_min` integer: Minimal chest movement rate (events per minute). *(Use 'data_fields' to request this data.)*
        - `chest_movement_rate_max` integer: Maximal chest movement rate (events per minute). *(Use 'data_fields' to request this data.)*
        - `core_body_temperature_min` number: Minimal core body temperature (in celsius degrees). *(Use 'data_fields' to request this data.)*
        - `core_body_temperature_max` number: Maximal core body temperature (in celsius degrees). *(Use 'data_fields' to request this data.)*
        - `core_body_temperature_avg` number: Average core body temperature (in celsius degrees). *(Use 'data_fields' to request this data.)*
        - `core_body_temperature_status` string: Status of the temperature. *(Use 'data_fields' to request this data)* Value can be: 'unknown', 'usual' or 'elevated'. | Value| |---| |unknown| |usual| |elevated|
    - `more` boolean: To know if there is more data to fetch or not.
    - `offset` integer: Offset to use to retrieve the next data.

---

[API](https://skmtc.dev/withings/apis/withings-developer-documentation.md) - [All operations](https://skmtc.dev/withings/apis/withings-developer-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/withings/apis/withings-developer-documentation/revisions/9e9accd01d4b?raw)
