Start a phase
Starts a bulk, cut, or maintenance phase and closes the open one. Omitted fields are filled in: start weight from the latest weigh-in, rate from the kind’s default (+0.25% / -0.5% / 0% bodyweight per week), goal weight projected to the planned end, and daily calories from data-driven maintenance plus the rate’s surplus or deficit. The phase’s numbers are written to the caller’s targets.
/api/phases__Secure-better-auth.session_tokenAPI key · cookierequiredBetter 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.
AuthorizationBearer token · headerrequiredPersonal API key sent as Authorization: Bearer skcal_…. Create and scope keys in the app under your profile → API keys. Keys default to full access; a scoped key is limited to its granted resource:action permissions and cannot manage other keys.
datestring<date>The caller's local calendar day (YYYY-MM-DD), the default start or end day. Defaults to the server's UTC date.
application/jsonThe phase to start.
kindstringPhase type; required to start a phase.
bulkcutmaintainstartDatestring<date>First day of the phase (default today).
plannedEndDatestring<date> | nullPlanned last day (YYYY-MM-DD); empty or null clears it.
goalWeightLbnumber | nullGoal body weight in pounds (default the start weight projected over the planned length).
ratePctPerWeeknumber | nullPlanned weekly change as a percent of bodyweight; positive gains, negative loses.
dailyKcalinteger | nullDaily calorie target (default maintenance from logged data plus the rate's surplus or deficit).
proteinGinteger | nullDaily protein target in grams to set with the phase.
notestring | nullFree-text note, e.g. the reason for the phase.
The phase was started.
okbooleanrequiredTrue once the phase is started.
phasePhaserequiredA goal phase with its progress.
Show propertiesHide properties
idstring<uuid>requiredPhase identifier.
kindstringrequiredPhase type.
bulkcutmaintainstartDatestring<date>requiredFirst day.
plannedEndDatestring<date> | nullrequiredPlanned last day.
endedDatestring<date> | nullrequiredDay it ended; null while it's the open phase.
activebooleanrequiredTrue for the open phase.
startWeightLbnumber | nullrequiredBodyweight at the start, in pounds.
goalWeightLbnumber | nullrequiredGoal bodyweight in pounds.
ratePctPerWeeknumber | nullrequiredPlanned weekly change, percent of bodyweight.
dailyKcalTargetinteger | nullrequiredThe phase's daily calorie target.
proteinTargetGinteger | nullrequiredThe phase's daily protein target in grams.
notestring | nullrequiredFree-text note.
progressPhaseProgressrequiredPlanned vs actual rate of change, from a least-squares fit over the phase's weigh-ins.
Show propertiesHide properties
weeksElapsednumberrequiredWeeks since the start (to the end, for a closed phase).
weeksPlannednumber | nullrequiredPlanned length in weeks.
latestWeightLbnumber | nullrequiredLatest weigh-in within the phase, in pounds.
changeLbnumber | nullrequiredChange since the start, in pounds.
plannedLbPerWeeknumber | nullrequiredPlanned weekly change in pounds.
actualLbPerWeeknumber | nullrequiredActual weekly change in pounds (null before a week of weigh-ins).
actualPctPerWeeknumber | nullrequiredActual weekly change as a percent of start weight.
statusstringrequiredWhether the actual rate is within a third of the plan.
on_tracktoo_fasttoo_slownot_enough_dataclosedPhaseIdstring | nullrequiredThe phase this one closed, if one was open.
kcalSourcestringrequiredWhere the calorie target came from; unchanged means there wasn't enough data to estimate maintenance.
givenestimatedunchangedmaintenanceKcalinteger | nullrequiredThe maintenance estimate used, if any.
The request body or parameters failed validation.
errorstringrequiredHuman-readable failure reason.
detailstringOptional extra context, present on upstream failures.