Skip to main content
PUT
Update goals

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 fields to change; omitted fields are left unchanged.

Partial update to a user's targets; omitted fields are left unchanged.

goalWeightKg
number

New target body weight in kilograms.

Example:

70

startWeightKg
number

New starting body weight in kilograms.

Example:

78.4

dailyKcalTarget
integer

New daily calorie target.

Example:

2100

proteinTargetG
integer

New daily protein target in grams.

Example:

170

targetDate
integer<int64>

New goal date as a Unix epoch in milliseconds.

Example:

1790000000000

Response

200 - application/json

The targets were updated.

Minimal success acknowledgement for write operations.

ok
boolean
required

Always true.

Example:

true