Get IRN Alerts List
chevron down
 

Get IRN Alerts List

This endpoint returns a paginated list of Irregular Rhythm Notifications (IRN) alerts, as well as all of the alert tachograms. This endpoint will only return alerts that the user has read in the Fitbit app already, as that is meant as the primary entrypoint for viewing notifications.

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

Scope: irregular_rhythm_notifications


Request

GET /1/user/[user-id]/irn/alerts/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

Response

Element Name Description
alerts : alertTime The start time for the irregular rhythm detection.
alerts : detectedTime The end time for the irregular rhythm detection.
alerts : serviceVersion The version of the service running when the alert was produced.
alerts : algoVersion The version of the algorithm running when the alert was produced.
alerts : deviceType The name of the device who generated the alert.
alerts : windows : startTime The start time for the analyzable window (representing 5 consecutive minutes of data following the start time).
alerts : windows : bpmData : time The timestamp of the individual heart beat.
alerts : windows : bpmData : value The extrapolated bpm value from the individual heart beat.
pagination : afterDate | beforeDate The afterDate or beforeDate parameter of the request (whichever was specified).
pagination : next The URL of the request that will fetch the next page of results.
pagination : previous The URL of the request that will fetch the previous page of results.
pagination : sort The sort parameter of the request.
pagination : limit The limit parameter of the request.

Maximum: 10
pagination : offset The offset parameter of the request.
{
  "alerts": [
    {
      "alertTime": "2022-09-28T17:12:30.000",
      "detectedTime": "2022-09-28T17:45:00.000",
      "serviceVersion": "2.2",
      "algoVersion": "1.6",
      "deviceType": "Sense",
      "windows": [
        {
          "startTime": "2022-09-28T17:12:30.000",
          "bpmData": [
            {
              "dataTime": "2022-09-28T17:12:30.124",
              "value": 73
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
    "afterDate": "2022-09-28T20:00:00",
    "next": "https://api.fitbit.com/1/user/-/irn/alerts/list.json?offset=0&limit=10&sort=asc&afterDate=2022-09-28T21:00:00",
    "previous": "",
    "sort": "asc",
    "limit": 1,
    "offset": 0
  }
}
      

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

Alert Filtering

We will only reveal AFib alerts that have been opened by the user in the Fitbit app. See How do Fitbit Irregular Rhythm Notifications check for atrial fibrillation (AFib)? It is important that the user is first aware of this notification and understands its importance to their health. The app explains to the user what an IRN is and that the notification is not a diagnosis. Once the user interacts with the notification, the information is shared via API.

Limit / Offset

The IRN data set is very large. Because of this, we cannot query and return large numbers of IRN results, and limit the number of results to 10. The offset query parameter is not fully supported and its 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.

Subscription Support for IRN

IRN does not support subscription notifications (webhooks). We recommend querying IRN 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 IRN data should be based on your specific use cases and with this in mind.

Rate limit

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

Device compatibility

The IRN 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 IRN data collection. See the Fitbit Product page to determine if your specific device supports IRN.