Fitbit
API actions for the Fitbit integration.
Fitbit
Track Fitbit activity, sleep, and wellness metrics.
Get daily activity summary
Get the daily activity summary for a specific date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | The date to get activity for (YYYY-MM-DD format). |
Response
{
"active_minutes": 45,
"calories": 2100,
"distance": 6.2,
"steps": 8500
}Get heart rate intraday
Get intraday heart rate data for a specific date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | The date to get heart rate data for (YYYY-MM-DD format). |
detail_level | string | No | Data granularity: '1sec', '1min', '5min', or '15min'. |
Response
{
"activities-heart": [
{
"dateTime": "2024-01-15",
"value": {
"restingHeartRate": 62
}
}
],
"activities-heart-intraday": {
"dataset": [
{
"time": "00:00",
"value": 58
}
]
}
}Get sleep logs
Get sleep logs for a specific date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | The date to get sleep logs for (YYYY-MM-DD format). |
Response
{
"sleep": [
{
"duration": 28800000,
"endTime": "2024-01-16T06:30:00.000",
"logId": 12345,
"startTime": "2024-01-15T22:30:00.000"
}
],
"summary": {
"totalMinutesAsleep": 420,
"totalTimeInBed": 480
}
}Get weight logs
Get weight logs for a specific date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | Date for the weight logs (yyyy-MM-dd). |
Response
{
"weight": [
{
"bmi": 23.1,
"date": "2024-01-15",
"logId": 111,
"weight": 75.5
}
]
}Log activity
Log a manual activity entry to Fitbit.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_name | string | Yes | Name of the activity to log. |
duration_minutes | number | Yes | Duration of the activity in minutes. |
date | string | Yes | Date for the activity (yyyy-MM-dd). |
start_time | string | Yes | Start time of the activity (HH:mm). |
calories | number | No | Optional calories burned estimate. |
Response
{
"activityLogId": 123456789
}Log water intake
Log water intake for a specific date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | Date of the water entry (yyyy-MM-dd). |
amount_liters | number | Yes | Liters of water consumed. |
Response
{
"waterLogId": 987654321
}