Get HRV Intraday by Date
chevron down
 

Get HRV Intraday by Date

This endpoint returns the Heart Rate Variability (HRV) intraday data for a single date. HRV data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date. It measures the HRV rate at various times and returns Root Mean Square of Successive Differences (rmssd), Low Frequency (LF), High Frequency (HF), and Coverage data for a given measurement. Rmssd measures short-term variability in your heart rate while asleep. LF and HF capture the power in interbeat interval fluctuations within either high frequency or low frequency bands. Finally, coverage refers to data completeness in terms of the number of interbeat intervals.

Single date measurements are provided at the end of a period of sleep. The data returned usually reflects a sleep period that began the day before. For example, if you request a daily HRV rate for 2021-12-22, it may include measurements that were taken the previous night on 2021-12-21 when the user fell asleep.

It uses units that correspond to the Accept-Language header provided.

Scope: heartrate


Request

GET /1/user/[user-id]/hrv/date/[date]/all.json

URI Arguments
user-id required The encoded ID of the user. Use "-" (dash) for current logged-in user.
date required The date in the format yyyy-MM-dd or today.

Request Headers
authorization required Specify the token type and Fitbit user’s access token.
Token type: Bearer
accept optional The media type of the response content the client is expecting.
Supported: application/json
accept-language optional The measurement unit system to use for response values. See Localization.
accept-locale optional The locale to use for response values. See Localization.

Examples
GET https://api.fitbit.com/1/user/-/hrv/date/2021-10-04/all.json
GET https://api.fitbit.com/1/user/GGNJL9/hrv/date/2021-10-04/all.json
curl -X GET "https://api.fitbit.com/1/user/-/hrv/date/2021-10-04/all.json" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"


Response

Element Name Description
hrv : dateTime The sleep log date specified in the format YYYY-MM-DD.
hrv : minutes : minute A measurement taken at a given time.
hrv : minutes : value : rmssd The Root Mean Square of Successive Differences (RMSSD) between heart beats. It measures short-term variability in the user’s heart rate in milliseconds (ms).
hrv : minutes : value : coverage Data completeness in terms of the number of interbeat intervals.
hrv : minutes : value : hf The power in interbeat interval fluctuations within the high frequency band (0.15 Hz - 0.4 Hz).
hrv : minutes : value : lf The power in interbeat interval fluctuations within the low frequency band (0.04 Hz - 0.15 Hz).
{
  "hrv": [
    {
      "minutes": [
        {
          "minute": "2021-10-25T09:10:00.000",
          "value": {
            "rmssd": 26.617,
            "coverage": 0.935,
            "hf": 126.514,
            "lf": 471.897
          }
        },
        {
          "minute": "2021-10-25T09:15:00.000",
          "value": {
            "rmssd": 34.845,
            "coverage": 0.988,
            "hf": 344.342,
            "lf": 1422.947
          }
        },
        {
          "minute": "2021-10-25T09:20:00.000",
          "value": {
            "rmssd": 36.893,
            "coverage": 0.981,
            "hf": 328.704,
            "lf": 298.071
          }
        },
        {
          "minute": "2021-10-25T09:25:00.000",
          "value": {
            "rmssd": 65.946,
            "coverage": 0.972,
            "hf": 1088.794,
            "lf": 979.685
          }
        },
      …
      ],
      "dateTime": "2021-10-25"
    }
  ]
}
      

Response Headers
content-type The media type of the response content being sent to the client.
Supported: application/json
fitbit-rate-limit-limit The quota number of calls.
fitbit-rate-limit-remaining The number of calls remaining before hitting the rate limit.
fitbit-rate-limit-reset The number of seconds until the rate limit resets.

Note: The rate limit headers are approximate and asynchronously updated. This means that there may be a minor delay in the decrementing of remaining requests. This could result in your application receiving an unexpected 429 response if you don't track the total number of requests you make yourself.

Response Type

HTTP Status Code HTTP response code. List of codes are found in the Troubleshooting Guide.
Status Message Description of the status code.
Response Body Contains the JSON response to the API call. When errors are returned by the API call, the errorType, fieldName and message text will provide more information to the cause of the failure.

Response Codes
200 A successful request.
400 The request had bad syntax or was inherently impossible to be satisfied.
401 The request requires user authentication.

Note: For a complete list of response codes, please refer to the Troubleshooting Guide.

Additional Information

Sleep periods

The value returned does not apply to a single date, necessarily, but to a measurement taken during a period of sleep. For most users, this will span two dates to account for the HRV values on the date at which the summary was provided, as well as during the previous night’s sleep.

Intraday data response frequency

HRV response data is returned every 5 minutes. This applies exclusively to intraday endpoints.

Collecting HRV data

HRV data is collected when the following conditions have been met:

  • the Health Metrics tile in the user's mobile application dashboard is enabled.
  • the data is only collected when the user is sleeping.
  • the user must have a minimum of 3 hours of sleep.
  • during the main sleep period, a sleep stages log is created.

If any of these items do not occur, then HRV data will not be collected.
For HRV, a HTTP status 200 means the endpoint executed successfully regardless if data exists. A premium subscription is not needed for the Health Metrics tile or HRV data collection.

There are many factors that can affect a user’s HRV value. Recording the data while a person is asleep allows the Fitbit device to correctly and accurately collect HRV data. Data is only processed when the user is still. If a user moves too much or their sleep session is too short, this can prevent HRV data from being processed correctly. In addition, if recorded data is incapable of computing specific sleep stages for a period of sleep, this will compromise the user’s ability to retrieve an HRV value.

The device automatically stops collecting HRV data after it determines the user is awake, typically through physical movements. Once the user syncs their device, HRV data will begin processing for that sleep period. It usually takes up to 15 minutes for the HRV data to be processed and made available to download.

You can read more about data accuracy on https://www.nature.com/articles/s41746-021-00493-6

Subscription Support for HRV

HRV does not support subscription notifications (webhooks). Since HRV is recorded during periods of sleep, the sleep notification arrival time can be used to estimate when the HRV data will be available (See the "Collecting Data" section). For applications that do not track sleep, or cannot retrieve sleep data, we recommend querying the HRV data once or twice a day to determine if new data is available (e.g. 12 noon and midnight).

Rate limit

The HRV endpoints are bound by our standard rate limit. See Rate Limits.

Device compatibility

HRV data is retrieved from the user’s Fitbit account. This gives the user secure and transparent control over their data. The data is then processed and made available through the API after the user syncs their device with the Fitbit data service.

Most of the current devices sold support HRV data collection. See the Fitbit Product page to determine if your specific device supports HRV.