API keys let scripts, shortcuts, and watch automations talk to your FuelKit account without your Google sign-in. The classic use: a phone automation that pushes your watch's active calories into FuelKit every evening, so your net balance is right without typing anything.
Create a key
In Profile → API keys, create a key with a name (so you'll recognize it later) and a scope:
- read — can look at your data but never change it.
- readwrite — can also log food, push active calories, and record weigh-ins.
Give each integration the smallest scope it needs.
The key is shown once, at creation — copy it then. FuelKit stores only a fingerprint, so a lost key can't be re-displayed; just revoke it and make a new one.
Use a key
Send it as a bearer token to https://fuelkit.app/api/v1/...:
Authorization: Bearer <your key>
Two examples:
# Read today's log
curl -H "Authorization: Bearer $KEY" https://fuelkit.app/api/v1/log/2026-08-20
# Push the watch's active calories for the day (readwrite scope)
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"measured": 450}' https://fuelkit.app/api/v1/active/2026-08-20
Pushed "measured" calories add to any activities you logged by hand — see Logging Food for how the two layers combine.
Always point automations at fuelkit.app — never at a pages.dev address, which some networks silently block.
A logged entry keeps the macros its food had when it was logged. After correcting a food, re-copy them onto an entry (quantity and slot are kept):
curl -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"refresh": true}' https://fuelkit.app/api/v1/log/2026-08-20/<entry id>
Meal plan and grocery list
The household's week and shopping list are on the API too, so a wall display or a script can show what's for dinner and tick things off as you shop.
# This week's plan (one entry per day per slot). ?week=YYYY-MM-DD picks the
# week containing that date — send your local date, the server runs in UTC.
curl -H "Authorization: Bearer $KEY" "https://fuelkit.app/api/v1/meal-plan?week=2026-10-05"
# The shopping list rolled up from that week's plan, plus your free-text extras
curl -H "Authorization: Bearer $KEY" https://fuelkit.app/api/v1/grocery
# Tick a row off (readwrite scope). Use the row's `key` exactly as returned.
curl -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"key": "2026-10-05:tortillas", "checked": true}' https://fuelkit.app/api/v1/grocery
Grocery rows are computed from the plan, so they have no permanent id. Each
row's key is the same one the Shop screen uses, which is why a tick made
through the API shows up in the app and vice versa. A key that is no longer on
the list, say after the week was replanned, is refused with 404. Read the list
again before ticking: a renamed food changes its row's key (the tick follows
it), and a row reads checked: false again when the week comes to need more
of it than when it was ticked.
A plan slot with sides lists them under sides. A write-in ("Leftovers") has a
meal but no mealId and carries note: true. Both fields appear only when
they apply.
Manage and revoke
The API keys list shows each key's scope, creation date, and when it was last used — a key that's never used again is safe to delete. Revoking is immediate: the next request with that key fails. Treat keys like passwords; if one may have leaked, revoke it and issue a fresh one.
Keys are personal — they act as you, and they're deleted with your account.