08-28-2019 06:42
08-28-2019 06:42
I'm looking at the sleep section of the WebAPI docs and I can't tell when the logs are updated. I want to create an app that can track how long and what stage of sleep I am in to dynamically adjust when my alarm goes off (all of this happens while I am asleep). Will one of the end-points be able to give me that data that I can periodically pull every half hour or so? Thanks!
08-28-2019 09:44
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-28-2019 09:44
Hi @Nicolas_N
The Get Sleep Log endpoint will display the sleep stages for you, but I'm not sure if the algorithm runs every time the device syncs while the user sleeps, or after the user officially wakes up. I'll need a few days to track down the answer for you.
Best Answer08-28-2019 13:45
08-28-2019 13:45
Awesome, thanks for taking a look! Let me know once you have an answer.
Best Answer09-03-2019 15:19
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-03-2019 15:19
Unfortunately, the Web APIs are not going to work for you, since they don't send live sleep data to your tracker/smart watch. The only suggestion I can provide is to build an application for the swart watch (Ionic or Versa family) that would track your movement and heart rate, similarly to what our sleep tracking functionality does today. To do this, look at the Device SDK, https://dev.fitbit.com/build/reference/device-api/. Support for the Device SDK is handled through the SDK forums, https://community.fitbit.com/t5/SDK-Development/bd-p/sdk. I understand the developers are fairly active and might be able to provide suggestions on how you can determine when you're awake or asleep using heart rate and accelerometer data (movement).
Best Answer03-31-2025 10:02
03-31-2025 10:02
Hey! I know this is super old now, but I was looking at the same thing--Did you ever figure anything out?
Best Answer03-31-2025 10:27
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-07-2025 13:05
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.