Skip to content

Dailies

Dailies are once-per-day health and lifestyle measurements that sit alongside activity data: body mass, resting heart rate, HRV, sleep, and a few others. Each measure has its own endpoint. Each value is keyed by date.

Available measures

Measure Identifier Unit Range
Body mass body_mass kg 0–500
Body fat percentage body_fat_pct % 0–100
Resting heart rate resting_hr bpm 0–250
Heart-rate variability hrv ms 0–500
Sleep duration sleep_duration seconds 0–86400
Sleep altitude sleep_altitude meters 0–10000
Menstrual cycle day menstrual_cycle_day day 0–100

The {measure} path parameter on every endpoint takes one of the identifiers above.

Upsert a measurement

POST /api/v1/dailies/{measure} writes or replaces the value for a given date.

curl -X POST "https://app.sweatstack.no/api/v1/dailies/body_mass" \
    -H "Authorization: Bearer {your_access_token}" \
    -H "Content-Type: application/json" \
    -d '{"date": "2026-05-06", "value": 72.4}'

A successful upsert returns the stored record:

{
    "date": "2026-05-06",
    "value": 72.4,
    "source": "user"
}

If a value already exists for that date and measure, it's replaced. There's no separate update endpoint.

Required scope

Upserting requires an API key with scope data:write.

List measurements

GET /api/v1/dailies/{measure} returns every record for a measure across a date range.

curl -X GET "https://app.sweatstack.no/api/v1/dailies/hrv?start=2026-04-01&end=2026-05-01" \
    -H "Authorization: Bearer {your_access_token}"

Available query parameters:

  • start (required): start date, YYYY-MM-DD format.
  • end (required): end date, YYYY-MM-DD format. Inclusive.
  • interpolate (optional, default true): fill in missing days for measures that support it. See Interpolation below.

The response is an array of records, one per day in the range:

[
    {"date": "2026-04-01", "value": 48.2, "source": "user"},
    {"date": "2026-04-02", "value": 47.8, "source": "user"},
    {"date": "2026-04-03", "value": null, "source": "user"}
]

A null value means no measurement exists for that date and the measure can't be interpolated.

Delete a measurement

DELETE /api/v1/dailies/{measure}?date={date} removes a single day's value.

curl -X DELETE "https://app.sweatstack.no/api/v1/dailies/body_mass?date=2026-05-06" \
    -H "Authorization: Bearer {your_access_token}"

Returns 204 on success, 404 if no record exists for that date.

Required scope

Deleting requires data:write.

Interpolation

Some measures change slowly enough that filling in missing days is meaningful. Others don't, and showing made-up values would be wrong.

Measure Strategy
Body mass Linear interpolation between known values.
Body fat percentage Linear interpolation between known values.
Sleep altitude Forward-fill from the last known value.
Menstrual cycle day Auto-incremented from the last known value.
Resting HR, HRV, sleep duration None. Missing days return value: null.

When interpolate=false, every measure returns raw recorded values only.

Python client

Dailies aren't yet exposed in the Python client. Use the API directly via Client.session or any HTTP library until the methods land.