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

Log sets by exercise

Logs sets the way a person says them (“bench 185 for 8, 8, 7”): finds the exercise in a session (default the active mesocycle’s next one) by name or muscle, fills its unlogged sets in order, and adds sets when more were done than planned.

POST/api/training/log
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.

Request body
requiredapplication/json

The exercise and the sets done.

exercisestring

Exercise name or muscle as the user said it; matched against the session.

slotIdstring

Exact slot id, instead of a name.

mesoIdstring

Mesocycle (default the active one).

weekinteger

Week (default the next session due).

dayinteger

Day (default the next session due).

setsobject[]required

The sets, in order.

min items 1 · max items 12
Show properties
Array of object
weightLbnumber

Load in pounds (0 for bodyweight).

repsintegerrequired

Reps completed in this set.

atstring | integer

When the set was finished, ISO 8601 with offset or epoch ms. Omit for sets done just now; sets sent together without times share one timestamp.

Responses
200

The sets were logged.

object
400

The request body or parameters failed validation.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://app.skcal.fit/api/training/log' \
  -H 'Cookie: __Secure-better-auth.session_token=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "exercise": "bench",
  "slotId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "mesoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "week": 2,
  "day": 1,
  "sets": [
    {
      "weightLb": 185,
      "reps": 8
    },
    {
      "weightLb": 185,
      "reps": 7
    }
  ]
}'
Response
{
  "ok": true,
  "week": 2,
  "day": 1,
  "exerciseName": "Barbell Bench Press",
  "muscle": "chest"
}

Was this page helpful?