Skip to content
skcal
Esc
↑↓navigate↵open⌘Jpreview

Get goals

Returns the caller’s targets, creating a default row on first access.

GET/api/targets
Authorization
__Secure-better-auth.session_tokenAPI key · cookierequired

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.

or
AuthorizationBearer token · headerrequired

Personal 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.

Responses
200

The caller's targets.

idintegerrequired

Auto-increment targets-row identifier.

goalWeightKgnumber | nullrequired

Target body weight in kilograms.

startWeightKgnumber | nullrequired

Starting body weight in kilograms.

targetDateinteger<int64> | nullrequired

Goal date as a Unix epoch in milliseconds.

startDateinteger<int64> | nullrequired

Plan start date as a Unix epoch in milliseconds.

dailyKcalTargetinteger | nullrequired

Daily calorie target.

proteinTargetGinteger | nullrequired

Daily protein target in grams.

heightCmnumber | nullrequired

Height in centimeters.

sexstring | nullrequired

Sex used for calorie math.

Allowed:malefemaleothernull
Try it
Server
Authorization
Request
curl -X GET 'https://app.skcal.fit/api/targets' \
  -H 'Cookie: __Secure-better-auth.session_token=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "id": 1,
  "goalWeightKg": 70,
  "startWeightKg": 78.4,
  "targetDate": 1790000000000,
  "startDate": 1782000000000,
  "dailyKcalTarget": 2100,
  "proteinTargetG": 170,
  "heightCm": 178,
  "sex": "male"
}

Was this page helpful?