Skip to main content
PUT
Upsert a day's totals

Authorizations

__Secure-better-auth.session_token
string
cookie
required

Better Auth session. Signing in (Google or email magic link) sets an HttpOnly session cookie that scopes every request to that account. The web app and CLI use this; agents use the OAuth 2.1 flow of the MCP server.

Body

application/json

The day's totals to store.

Body for upserting a day's totals directly.

date
string<date>
required

Calendar day to upsert (YYYY-MM-DD).

Example:

"2026-06-29"

kcal
integer | null

Total calories to set for the day.

Required range: 0 <= x <= 20000
Example:

2150

proteinG
integer | null

Total protein in grams to set for the day.

Required range: 0 <= x <= 1000
Example:

168

hitProtein
boolean | null

Whether to mark the protein target as met.

Example:

true

adherence
enum<string> | null

Calorie adherence bucket to set.

Available options:
under,
on,
over,
null
Example:

"on"

Response

The day's totals were stored.

Minimal success acknowledgement for write operations.

ok
boolean
required

Always true.

Example:

true