The new API v2 provides improved pagination, consistent snake_case JSON fields, and better error handling.
Base URL: /api/v2
Key features:
See API v2 documentation for detailed endpoint documentation and examples.
The original API v1 is still available and fully functional at /api/v1.
The API is documented using swagger.
You must enable API access for your user, and copy the API key. You can use the
API key as a query parameter (?api-key=${API_KEY}) or as a header
(Authorization: Bearer ${API_KEY}).
You can configure some tools to automatically upload files to Workout Tracker,
using the POST /api/v1/import/$program API endpoint.
You can set or update a daily measurement record:
curl -sSL -H "Authorization: bearer your-api-key" \
http://localhost:8080/api/v1/daily \
--data @- <<EOF
{
"date": "2025-01-13",
"weight": 70,
"weight_unit": "kg",
"height": 178,
"height_unit": "cm"
}
EOF
You can create a workout manually:
curl -sSL -H "Authorization: bearer your-api-key" \
http://localhost:8080/api/v1/workouts \
--data @- <<EOF
{
"name": "Workout name",
"date": "2025-02-03T10:26",
"duration_hours": 1,
"duration_minutes": 10,
"distance": 13,
"type": "running"
}
EOF
The generic upload endpoint takes the recording as body. Prepend the path with
@ to tell curl to read the data from a file:
curl -sSL -H "Authorization: bearer your-api-key" \
http://localhost:8080/api/v1/import/generic \
--data @path/to/recorded.gpx
Read their documentation before you continue.
The path to POST to is: /api/v1/import/fitotrack?api-key=${API_KEY}