Get goals
Returns the caller’s targets, creating a default row on first access.
/api/targets__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.
The caller's targets.
idintegerrequiredAuto-increment targets-row identifier.
goalWeightKgnumber | nullrequiredTarget body weight in kilograms.
startWeightKgnumber | nullrequiredStarting body weight in kilograms.
targetDateinteger<int64> | nullrequiredGoal date as a Unix epoch in milliseconds.
startDateinteger<int64> | nullrequiredPlan start date as a Unix epoch in milliseconds.
dailyKcalTargetinteger | nullrequiredDaily calorie target.
proteinTargetGinteger | nullrequiredDaily protein target in grams.
heightCmnumber | nullrequiredHeight in centimeters.
sexstring | nullrequiredSex used for calorie math.
malefemaleothernull