openapi: 3.0.3
info:
version: '2.0'
title: Withings developer documentation answers measure API
description: These webservices allows you to get user's answers from surveys
servers:
- url: https://wbsapi.withings.net/
tags:
- name: measure
x-displayName: Measure
description: The following services gives access to several types of Health Data collected by a user. The data are only available once a synchronization occured between the device and Withings servers (which might include synchronizing with Withings mobile application or via Withings Mobile SDK).
paths:
https://wbsapi.withings.net/measure:
post:
tags:
- measure
description: Provides measures stored at a specific date among the types below. Please refer to the following responses for details.
summary: Measure - Getmeas
operationId: measure-getmeas
parameters:
- name: action
in: query
required: true
schema:
type: string
description: Service action name. Must take the string value ```getmeas```.
- name: meastype
in: query
required: false
schema:
type: integer
description: 'Requested measure type :
|Value | Description|
|---|---|
|1 | Weight (kg)|
|4 | Height (meter)|
|5 | Fat Free Mass (kg)|
|6 | Fat Ratio (%)|
|8 | Fat Mass Weight (kg)|
|9 | Diastolic Blood Pressure (mmHg)|
|10 | Systolic Blood Pressure (mmHg)|
|11 | Heart Pulse (bpm) - only for BPM and scale devices|
|12 | Temperature (celsius)|
|54 | SP02 (%)|
|71 | Body Temperature (celsius)|
|73 | Skin Temperature (celsius)|
|76 | Muscle Mass (kg)|
|77 | Hydration (kg)|
|88 | Bone Mass (kg)|
|91 | Pulse Wave Velocity (m/s)|
|123 | VO2 max is a numerical measurement of your body’s ability to consume oxygen (ml/min/kg).|
|130 | Atrial fibrillation result|
|135 | QRS interval duration based on ECG signal|
|136 | PR interval duration based on ECG signal|
|137 | QT interval duration based on ECG signal|
|138 | Corrected QT interval duration based on ECG signal|
|139 | Atrial fibrillation result from PPG|
|155 | Vascular age|
|167 | Nerve Health Score Conductance 2 electrodes Feet|
|168 | Extracellular Water in kg|
|169 | Intracellular Water in kg|
|170 | Visceral Fat (without unity)|
|173 | Fat Free Mass for segments|
|174 | Fat Mass for segments in mass unit|
|175 | Muscle Mass for segments|
|196 | Electrodermal activity feet|
|226 | Basal Metabolic Rate (BMR)|
|227 | Metabolic Age|
|229 | Electrochemical Skin Conductance (ESC)|
'
- name: meastypes
in: query
required: false
schema:
type: list of integers
description: 'List of requested measure types (separated by a comma).<br>Ex: meastypes=1,4,12'
- name: category
in: query
required: false
schema:
type: integer
description: '```1``` for real measures, ```2``` for user objectives.'
- name: startdate
in: query
required: false
schema:
type: integer
description: Data start date as a unix timestamp.
format: timestamp
- name: enddate
in: query
required: false
schema:
type: integer
description: Data end date as a unix timestamp.
format: timestamp
- name: lastupdate
in: query
required: false
schema:
type: integer
description: Timestamp for requesting data that were updated or created after this date.<br>Useful for data synchronization between systems.<br>Use this instead of startdate + enddate.
- name: offset
in: query
required: false
schema:
type: integer
description: When a first call returns ```more:1``` and ```offset:XX```, set value ```XX``` in this parameter to retrieve next available rows.
- name: Authorization
in: header
required: true
schema:
type: string
description: 'Used to pass your access token. Must take value: ```Bearer {your access_token}``` Replace {your access_token} with the access_token'
responses:
200:
description: ' (Click to unfold)'
content:
application/json:
schema:
type: object
properties:
status:
type: integer
description: Response status. See <a href='#section/Response-status'>Status</a> section for details.
body:
type: object
description: Response data.
properties:
updatetime:
type: string
description: Server time at which the answer was generated.
timezone:
type: string
description: Timezone for the date.
measuregrps:
type: array
description: For every measure/measurement made, a measure group is created. The measure group purpose is to group together measures that have been taken at the same time. For instance, when measuring blood pressure you will have a measure group with a systole measure, a diastole measure, and a heartrate measure. Every time a measure is create/updated/deleted, the corresponding measure group is updated.
items:
$ref: '#/components/schemas/measuregrp_object'
more:
type: integer
description: To know if there is more data to fetch or not.
offset:
type: integer
description: Offset to use to retrieve the next data.
x-codeSamples:
- lang: PHP
source: "<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, \"https://wbsapi.withings.net/measure\");\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t'Authorization: Bearer YOUR_ACCESS_TOKEN'\n]);\n\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ \n\t'action' => 'getmeas',\n\t'meastype' => 'meastype',\n\t'meastypes' => 'meastypes',\n\t'category' => 'category',\n\t'startdate' => 'startdate',\n\t'enddate' => 'enddate',\n\t'lastupdate' => 'int',\n\t'offset' => 'offset'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>"
- lang: CURL
source: 'curl --header "Authorization: Bearer YOUR_ACCESS_TOKEN" --data "action=getmeas&meastype=meastype&meastypes=meastypes&category=category&startdate=startdate&enddate=enddate&lastupdate=int&offset=offset" ''https://wbsapi.withings.net/measure'''
'https://wbsapi.withings.net/v2/measure ':
post:
tags:
- measure
description: ''
summary: Measure v2 - Confirmuser
operationId: measurev2-confirmuser
parameters:
- name: action
in: query
required: true
schema:
type: string
description: Service action name. Must take the string value ```confirmuser```.
- name: grpid
in: query
required: true
schema:
type: id64n
description: Group ID
- name: is_confirmed
in: query
required: true
schema:
type: boolean
description: Indicates if the measure was confirmed by the user.
- name: Authorization
in: header
required: true
schema:
type: string
description: 'Used to pass your access token. Must take value: ```Bearer {your access_token}``` Replace {your access_token} with the access_token'
responses:
200:
description: ' (Click to unfold)'
content:
application/json:
schema:
type: object
properties:
status:
type: integer
description: Response status. See <a href='#section/Response-status'>Status</a> section for details.
body:
type: object
description: Response data.
properties: []
x-codeSamples:
- lang: PHP
source: "<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, \"https://wbsapi.withings.net/v2/measure \");\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t'Authorization: Bearer YOUR_ACCESS_TOKEN'\n]);\n\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ \n\t'action' => 'confirmuser',\n\t'grpid' => 'id64n',\n\t'is_confirmed' => 'boolean'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>"
- lang: CURL
source: 'curl --header "Authorization: Bearer YOUR_ACCESS_TOKEN" --data "action=confirmuser&grpid=id64n&is_confirmed=boolean" ''https://wbsapi.withings.net/v2/measure '''
https://wbsapi.withings.net/v2/measure:
post:
tags:
- measure
description: Provides daily aggregated activity data of a user.
summary: Measure v2 - Getactivity
operationId: measurev2-getactivity
parameters:
- name: action
in: query
required: true
schema:
type: string
description: Service action name. Must take the string value ```getactivity```.
- name: startdateymd
in: query
required: true
schema:
type: string
description: 'DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>Start date.'
format: Y-m-d
- name: enddateymd
in: query
required: true
schema:
type: string
description: 'DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>End date.'
format: Y-m-d
- name: lastupdate
in: query
required: true
schema:
type: integer
description: 'DO NOT USE WITH FOLLOWING PARAMS: [startdateymd, enddateymd]<br>Timestamp for requesting data that were updated or created after this date.<br>Useful for data synchronization between systems.<br>Use this instead of startdateymd + enddateymd.'
- name: offset
in: query
required: false
schema:
type: integer
description: When a first call returns ```more:true``` and ```offset:XX```, set value ```XX``` in this parameter to retrieve next available rows.
- name: data_fields
in: query
required: false
schema:
type: string
description: 'List of requested data fields, separated by a comma.<br>Available data fields are listed below.<br><u>Ex</u>: data_fields=steps,distance,elevation<br><br>steps<br>> Number of steps. <br><br>distance<br>> Distance travelled (in meters). <br><br>elevation<br>> Number of floors climbed. <br><br>soft<br>> Duration of soft activities (in seconds). <br><br>moderate<br>> Duration of moderate activities (in seconds). <br><br>intense<br>> Duration of intense activities (in seconds). <br><br>active<br>> Sum of intense and moderate activity durations (in seconds). <br><br>calories<br>> Active calories burned (in Kcal). Calculated by mixing fine granularity calories estimation, workouts estimated calories and calories manually set by the user. <br><br>totalcalories<br>> Total calories burned (in Kcal). Obtained by adding active calories (see ```calories```) and passive calories.<br><br>hr_average<br>> Average heart rate. (beats per minute).<br><br>hr_min<br>> Minimal heart rate (beats per minute). <br><br>hr_max<br>> Maximal heart rate (beats per minute).. <br><br>hr_zone_0<br>> Duration in seconds when heart rate was in a light zone (cf. <a href=''/api-reference/#section/Glossary''>Glossary</a>). <br><br>hr_zone_1<br>> Duration in seconds when heart rate was in a moderate zone (cf. <a href=''/api-reference/#section/Glossary''>Glossary</a>). <br><br>hr_zone_2<br>> Duration in seconds when heart rate was in an intense zone (cf. <a href=''/api-reference/#section/Glossary''>Glossary</a>). <br><br>hr_zone_3<br>> Duration in seconds when heart rate was in maximal zone (cf. <a href=''/api-reference/#section/Glossary''>Glossary</a>). <br><br>'
- name: Authorization
in: header
required: true
schema:
type: string
description: 'Used to pass your access token. Must take value: ```Bearer {your access_token}``` Replace {your access_token} with the access_token'
responses:
200:
description: ' (Click to unfold)'
content:
application/json:
schema:
type: object
properties:
status:
type: integer
description: Response status. See <a href='#section/Response-status'>Status</a> section for details.
body:
type: object
description: Response data.
properties:
activities:
type: array
items:
$ref: '#/components/schemas/activity_object'
more:
type: boolean
description: To know if there is more data to fetch or not.
offset:
type: integer
description: Offset to use to retrieve the next data.
x-codeSamples:
- lang: PHP
source: "<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, \"https://wbsapi.withings.net/v2/measure\");\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t'Authorization: Bearer YOUR_ACCESS_TOKEN'\n]);\n\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ \n\t'action' => 'getactivity',\n\t'startdateymd' => '2020-07-01',\n\t'enddateymd' => '2020-07-02'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>"
- lang: CURL
source: 'curl --header "Authorization: Bearer YOUR_ACCESS_TOKEN" --data "action=getactivity&startdateymd=2020-07-01&enddateymd=2020-07-02" ''https://wbsapi.withings.net/v2/measure'''
'https://wbsapi.withings.net/v2/measure ':
post:
tags:
- measure
description: "Returns user activity data captured at high frequency.\n\n**Notes:**\n\n - If your input ```startdate``` and ```enddate``` are separated by more than 24h, only the first 24h after ```startdate``` will be returned.\n - If no ```startdate``` and ```enddate``` are passed as parameters, the most recent activity data will be returned."
summary: Measure v2 - Getintradayactivity
operationId: measurev2-getintradayactivity
parameters:
- name: action
in: query
required: true
schema:
type: string
description: Service action name. Must take the string value ```getintradayactivity```.
- name: startdate
in: query
required: false
schema:
type: integer
description: Data start date as a unix timestamp.
format: timestamp
- name: enddate
in: query
required: false
schema:
type: integer
description: Data end date as a unix timestamp.
format: timestamp
- name: data_fields
in: query
required: false
schema:
type: string
description: 'List of requested data fields, separated by a comma.<br>Available data fields are listed below.<br><u>Ex</u>: data_fields=steps,elevation,calories<br><br>steps<br>> Number of steps. <br><br>elevation<br>> Number of floors climbed. <br><br>calories<br>> Estimation of active calories burned (in Kcal). <br><br>distance<br>> Distance travelled (in meters). <br><br>stroke<br>> Number of strokes performed. <br><br>pool_lap<br>> Number of pool_lap performed. <br><br>duration<br>> Duration of the activity (in seconds). <br><br>heart_rate<br>> Measured heart rate. <br><br>spo2_auto<br>> SpO2 measurement automatically tracked by a device tracker<br><br>rmssd<br>> Heart rate variability - Root mean square of the successive differences over "a few seconds" (in miliseconds).<br><br>sdnn1<br>> Heart rate variability - Standard deviation of the NN over 1 minute (in miliseconds).<br><br>hrv_quality<br>> Heart rate variability - quality score.<br><br>core_body_temperature<br>> The core body temperature<br><br>rr<br>> Respiration Rate (breaths per minute). <br><br>chest_movement_rate<br>> Chest movement rate (events per minute). <br><br>'
- name: Authorization
in: header
required: true
schema:
type: string
description: 'Used to pass your access token. Must take value: ```Bearer {your access_token}``` Replace {your access_token} with the access_token'
responses:
200:
description: ' (Click to unfold)'
content:
application/json:
schema:
type: object
properties:
status:
type: integer
description: Response status. See <a href='#section/Response-status'>Status</a> section for details.
body:
type: object
description: Response data.
properties:
series:
type: object
properties:
$timestamp:
type: object
description: $timestamp represents the epoch value of the intraday data
properties:
deviceid:
type: string
description: '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>.'
example: 892359876fd8805ac45bab078c4828692f0276b1
model:
type: string
description: 'Device model. Value can be:
| Value | Description|
|---|---|
|Withings WBS01 | Scale|
|WS30 | Scale|
|Kid Scale | Scale|
|Smart Body Analyzer | Scale|
|Body+ | Scale|
|Body Cardio | Scale|
|Body | Scale|
|Body Scan | Scale|
|Body Pro | Scale|
|WBS10 | Scale|
|WBS11 | Scale|
|Body Comp | Scale|
|Smart Baby Monitor | Babyphone|
|Withings Home | Babyphone|
|Withings Blood Pressure Monitor V1 | Blood Pressure Monitor|
|Withings Blood Pressure Monitor V2 | Blood Pressure Monitor|
|Withings Blood Pressure Monitor V3 | Blood Pressure Monitor|
|BPM Core | Blood Pressure Monitor|
|BPM Connect | Blood Pressure Monitor|
|BPM Connect Pro | Blood Pressure Monitor|
|BPM Pro 2 | Blood Pressure Monitor|
|BPM Vision | Blood Pressure Monitor|
|Pulse | Activity Tracker|
|Activite | Activity Tracker|
|Activite (Pop, Steel) | Activity Tracker|
|Withings Go | Activity Tracker|
|Activite Steel HR | Activity Tracker|
|Activite Steel HR Sport Edition | Activity Tracker|
|Pulse HR | Activity Tracker|
|Move | Activity Tracker|
|Move ECG | Activity Tracker|
|ScanWatch | Activity Tracker|
|ScanWatch 2 | Activity Tracker|
|ScanWatch Light | Activity Tracker|
|Aura Dock | Sleep Monitor|
|Aura Sensor | Sleep Monitor|
|Aura Sensor V2 | Sleep Monitor|
|Thermo | Smart Connected Thermometer|
|BeamO | Smart Connected Thermometer|
|WUP01 | Gateway|
|Iglucose glucometer | iGlucose|
|iOS step tracker | HealthKit Apple|
|HealthKit step iPhone tracker | HealthKit Apple|
|HealthKit step Apple Watch tracker | HealthKit Apple|
|HealthKit other step tracker | HealthKit Apple|
|Android step tracker | HealthKit Google|
|GoogleFit tracker | HealthKit Google|
|Samsung Health tracker | HealthKit Google|
|Google Health Connect | HealthKit Google|
|Huawei tracker | HealthKit Huawei|
|Lingo Sensor | Lingo|
'
example: Pulse
model_id:
type: integer
description: '
| Value | Description|
|---|---|
|1 | Withings WBS01|
|2 | WS30|
|3 | Kid Scale|
|4 | Smart Body Analyzer|
|5 | Body+|
|6 | Body Cardio|
|7 | Body|
|10 | Body Scan|
|9 | Body Pro|
|11 | WBS10|
|12 | WBS11|
|18 | Body Comp|
|21 | Smart Baby Monitor|
|22 | Withings Home|
|41 | Withings Blood Pressure Monitor V1|
|42 | Withings Blood Pressure Monitor V2|
|43 | Withings Blood Pressure Monitor V3|
|44 | BPM Core|
|45 | BPM Connect|
|46 | BPM Connect Pro|
|47 | BPM Pro 2|
|48 | BPM Vision|
|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|
|60 | Aura Dock|
|61 | Aura Sensor|
|63 | Aura Sensor V2|
|70 | Thermo|
|71 | BeamO|
|100 | WUP01|
|1061 | Iglucose glucometer|
|1051 | iOS step tracker|
|1052 | iOS step tracker|
|1057 | HealthKit step iPhone tracker|
|1058 | HealthKit step Apple Watch tracker|
|1059 | HealthKit other step tracker|
|1053 | Android step tracker|
|1054 | Android step tracker|
|1055 | GoogleFit tracker|
|1056 | Samsung Health tracker|
|1060 | Google Health Connect|
|1062 | Huawei tracker|
|1063 | Lingo Sensor|
'
example: 51
steps:
type: integer
description: Number of steps. *(Use 'data_fields' to request this data.)*
elevation:
type: number
description: Number of floors climbed. *(Use 'data_fields' to request this data.)*
calories:
type: number
description: Estimation of active calories burned (in Kcal). *(Use 'data_fields' to request this data.)*
distance:
type: number
description: Distance travelled (in meters). *(Use 'data_fields' to request this data.)*
stroke:
type: integer
description: Number of strokes performed. *(Use 'data_fields' to request this data.)*
pool_lap:
type: integer
description: Number of pool_lap performed. *(Use 'data_fields' to request this data.)*
duration:
type: integer
description: Duration of the activity (in seconds). *(Use 'data_fields' to request this data.)*
heart_rate:
type: integer
description: Measured heart rate. *(Use 'data_fields' to request this data.)*
spo2_auto:
type: number
description: SpO2 measurement automatically tracked by a device tracker
rmssd:
type: number
description: Heart rate variability - Root mean square of the successive differences over "a few seconds" (in miliseconds).
sdnn1:
type: number
description: Heart rate variability - Standard deviation of the NN over 1 minute (in miliseconds).
hrv_quality:
type: integer
description: Heart rate variability - quality score.
core_body_temperature:
type: number
description: The core body temperature
rr:
type: integer
description: Respiration Rate (breaths per minute). *(Use 'data_fields' to request this data.)*
chest_movement_rate:
type: integer
description: Chest movement rate (events per minute). *(Use 'data_fields' to request this data.)*
x-codeSamples:
- lang: PHP
source: "<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, \"https://wbsapi.withings.net/v2/measure \");\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t'Authorization: Bearer YOUR_ACCESS_TOKEN'\n]);\n\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ \n\t'action' => 'getintradayactivity',\n\t'startdate' => 'startdate',\n\t'enddate' => 'enddate',\n\t'data_fields' => 'data_fields'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>"
- lang: CURL
source: 'curl --header "Authorization: Bearer YOUR_ACCESS_TOKEN" --data "action=getintradayactivity&startdate=startdate&enddate=enddate&data_fields=data_fields" ''https://wbsapi.withings.net/v2/measure '''
'https://wbsapi.withings.net/v2/measure ':
post:
tags:
- measure
description: 'Returns workout summaries, which are an aggregation all data that was captured during that workout.
Use the [Measure v2 - Getintradayactivity](#operation/measurev2-getintradayactivity) service to get the high frequency data used to build this summary.'
summary: Measure v2 - Getworkouts
operationId: measurev2-getworkouts
parameters:
- name: action
in: query
required: true
schema:
type: string
description: Service action name. Must take the string value ```getworkouts```.
- name: startdateymd
in: query
required: true
schema:
type: string
description: 'DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>Start date.'
format: Y-m-d
- name: enddateymd
in: query
required: true
schema:
type: string
description: 'DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>End date. Required if startdateymd is provided.'
format: Y-m-d
- name: lastupdate
in: query
required: true
schema:
type: integer
description: 'DO NOT USE WITH FOLLOWING PARAMS: [startdateymd, enddateymd]<br>Timestamp for requesting data that were updated or created after this date.<br>Useful for data synchronization between systems.<br>Use this instead of startdateymd + enddateymd.'
- name: offset
in: query
required: false
schema:
type: integer
description: When a first call returns ```more:true``` and ```offset:XX```, set value ```XX``` in this parameter to retrieve next available rows.
- name: data_fields
in: query
required: false
schema:
type: string
description: "List of requested data fields, separated by a comma.<br>Available data fields are listed below.<br><u>Ex</u>: data_fields=calories,intensity,manual_intensity<br><br>calories<br>> Active calories burned (in Kcal). <br><br>intensity<br>> Intensity of the workout, from 0 to 100, as inputed by the user. If the user didn't manually give the intensity of his workout, the value will be 0.<br><br>manual_intensity<br>> Intensity of the workout, from 0 to 100, entered by the user. If the user didn't manually give the intensity of his workout, the value will be 0.<br><br>manual_distance<br>> Distance travelled manually entered by user (in meters). <br><br>manual_calories<br>> Active calories burned manually entered by user (in Kcal). <br><br>hr_average<br>> Average heart rate. (beats per minute).<br><br>hr_min<br>> Minimal heart rate (beats per minute). <br><br>hr_max<br>> Maximal heart rate (beats per minute).. <br><br>hr_zone_0<br>> Duration in seconds when heart rate was in a light zone (cf. <a href='/api-reference/#section/Glossary'>Glossary</a>). <br><br>hr_zone_1<br>> Duration in seconds when heart rate was in a moderate zone (cf. <a href='/api-reference/#section/Glossary'>G
# --- truncated at 32 KB (68 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/withings/refs/heads/main/openapi/withings-measure-api-openapi.yml