Get ECG Log List
chevron down
 

Get ECG Log List

This endpoint retrieves a list of the user’s Electrocardiogram (ECG) log entries before or after a given day.

Note: The ECG API is for research use or investigational use only, and is not intended for clinical or diagnostic purposes.

Scope: electrocardiogram


Request

GET /1/user/[user-id]/ecg/list.json

URI Arguments
user-id required The encoded ID of the user. Use "-" (dash) for current logged-in user.

Query Parameters
beforeDate optional / required The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate must be specified. string ($date or $timestamp)
afterDate optional / required The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate must be specified. string ($date or $timestamp)
sort required The sort order of entries by date. Use asc (ascending) when using afterDate. Use desc (descending) when using before date. string
limit required The number of entries returned. See Limit / Offset for more information.

Maximum: 10
integer
offset required See Limit / Offset for more information.

Supported: 0
integer

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/-/ecg/list.json?afterDate=2022-09-28&sort=asc&limit=1&offset=0
GET https://api.fitbit.com/1/user/GGNJL9/ecg/list.json?afterDate=2022-09-28&sort=asc&limit=1&offset=0
curl -X GET "https://api.fitbit.com/1/user/-/ecg/list.json?afterDate=2022-09-28&sort=asc&limit=1&offset=0" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"


Response

Element Name Description
ecgReadings : startTime The date and time when the reading was started on the device.
ecgReadings : averageHeartRate The average heart rate of the user during the reading.
ecgReadings : resultClassification See Classification of ECG results for more information.

Supported: Atrial Fibrillation | Normal Sinus Rhythm | Inconclusive | Inconclusive: High heart rate | Inconclusive: Low heart rate

ecgReadings : waveformSamples An array of integers representing the ECG waveform.
ecgReadings : samplingFrequencyHz The frequency in hertz at which the Fitbit ECG app sampled the voltage.

Supported: 250

ecgReadings : scalingFactor The scaling factor used to convert waveform samples to ECG voltages in mV (mV = waveformSamples / scalingFactor).

Supported: 10922

ecgReadings : numberOfWaveformSamples The total number of samples in the reading
ecgReadings : leadNumber The ECG lead being used to take the reading. The compatible Fitbit wrist-worn devices contain a single-lead. Therefore, the leadNumber will always be 1.

Supported: 1

ecgReadings : featureVersion The version of the ECG app running on the device. The format of the compatible wrist-worn device components’ version [x.xx-x.xx-x.xx] represents app-service-web respectively.
ecgReadings : deviceName Hardware name of the compatible wrist-worn device used to take the reading.
ecgReadings : firmwareVersion Firmware running on the compatible wrist-worn device used to take the reading.
pagination : afterDate | beforeDate The afterDate or beforeDate parameter of the request (whichever was specified).
pagination : limit The limit parameter of the request.

Maximum: 10
pagination : next The URL of the request that will fetch the next page of results.
pagination : offset The offset parameter of the request.
pagination : previous The URL of the request that will fetch the previous page of results.
pagination : sort The sort parameter of the request.
{
    "ecgReadings": [
    {
        "startTime": "2022-09-28T17:12:30.222",
        "averageHeartRate": 70,
        "resultClassification": "Normal Sinus Rhythm",
        "waveformSamples": [
            130,
            176,
            252,
            365,
            ...
        ],
        "samplingFrequencyHz": "250",
        "scalingFactor": 10922,
        "numberOfWaveformSamples": 7700,
        "leadNumber": 1,
        "featureVersion": "1.2.3-2.11-2.14",
        "deviceName": "Sense",
        "firmwareVersion": "1.2.3"
    }
    ],
    pagination : {
        "afterDate": "2022-09-28T20:00:00",
        "limit": 1,
        "next": "https://api.fitbit.com/1/user/-/ecg/list.json?offset=10&limit=10&sort=asc&afterDate=2022-09-28T21:00:00",
        "offset": 0
        "previous": "",
        "sort": "asc"
}
}

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

You can read more about data accuracy in the Clinical Study section of the Fitbit ECG App Instructions for Use.

Additional information about the Fitbit ECG app can be found in the help article What is the Fitbit ECG app?.

Limit / Offset

ECG data is very large because of the waveforms. Because of this, we cannot query and return large numbers of ECG results, and limit the number of results to 10. The offset query parameter is not fully supported and it's future is unknown. Therefore, the only supported value is 0. Using the "offset" query parameter in any other capacity could cause your application to break.

To paginate, request the next and previous links in the pagination response object. The next and previous link should include afterDate or beforeDate parameters of the datetime for the last reading in each page.

Collecting ECG data

Before taking your first reading, review the Heart Rhythm Assessment. The Heart Rhythm Assessment is found in the Fitbit mobile application. Instructions can be found in the section "How do I use the Fitbit ECG app?" within the help article What is the Fitbit ECG app?.

Classification of ECG results

After the user takes a 30 second ECG reading or spot check, Fitbit classifies the user's heart rhythm as one of the 5 results:

  • Atrial fibrillation (AFib): Your heart rhythm shows signs of AFib, an irregular heart rhythm. AFib can have serious health effects. You should contact your doctor.
  • Normal sinus rhythm (NSR): Your heart rhythm appears normal. It doesn’t show signs of AFib, an irregular heart rhythm.
  • Inconclusive: If your heart rate is over 120 bpm or under 50 bpm, the Fitbit ECG app can’t assess your heart rhythm. There are many possible reasons for getting an inconclusive result, but common causes are moving too much during the assessment, not resting git stat your hands on a table, or other arrhythmia.
  • Inconclusive: High heart rate: If your heart rate is over 120 bpm, the Fitbit ECG app can’t assess your heart rhythm. Heart rate can be high for many reasons, such as: recent exercise, stress, nervousness, alcohol, dehydration, infection, AFib, or other arrhythmia.
  • Inconclusive: Low heart rate: If your heart rate is under 50 bpm, the Fitbit ECG app can’t assess your heart rhythm. Heart rate can be low for many reasons, such as: taking certain medications such as beta-blockers or calcium channel blockers, having excellent aerobic fitness, or other arrhythmia.

Subscription Support for ECG

ECG does not support subscription notifications (webhooks). We recommend querying ECG data once or twice a day to determine if new data is available (e.g. 12 noon and midnight). However, the frequency or rate at which you query ECG data should be based on your specific use cases and with this in mind.

Rate limit

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

Device compatibility

ECG 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 data syncs with the Fitbit ECG service.

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