API

Read your own calories, macros and morning weights for a range of dates, as JSON. The API is read-only: a key can fetch your days and do nothing else.

Key

In the app, open Settings, then Data, then Create under API. The key starts with fcr_ and is shown once, so copy it then. Replace makes a new key and retires the old one; Delete retires it outright.

Send it as a bearer token on every request.

Authorization: Bearer fcr_your_key

Days

GET https://accurate-lion-489.convex.site/api/v1/days

One row for each day in the range that has food or a weigh-in, oldest first. A day with neither is left out. A range may cover up to 366 days.

Parameters

start
First day, YYYY-MM-DD. Default: 29 days before end.
end
Last day, YYYY-MM-DD, inclusive. Default: today.

Request

curl "https://accurate-lion-489.convex.site/api/v1/days?start=2026-03-01&end=2026-03-03" \
  -H "Authorization: Bearer fcr_your_key"

Response

{
  "start": "2026-03-01",
  "end": "2026-03-03",
  "weightUnit": "lb",
  "days": [
    { "date": "2026-03-01", "calories": 1000, "protein": 42, "carbs": 132, "fat": 30, "weight": 201.4 },
    { "date": "2026-03-02", "calories": 800, "protein": 70, "carbs": 0, "fat": 55, "weight": null },
    { "date": "2026-03-03", "calories": null, "protein": null, "carbs": null, "fat": null, "weight": 200.8 }
  ]
}

Fields

date
The day, YYYY-MM-DD, in your timezone.
calories
Calories logged that day. null when nothing was logged.
protein, carbs, fat
Grams logged that day. null when nothing was logged.
weight
That morning's weigh-in, in pounds. null when there was none.

Errors

400
A date that is not YYYY-MM-DD, an end before the start, or more than 366 days.
401
No key, or a key that has been replaced or deleted.