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

End a phase

Closes the open phase on the given day (default today) without starting another.

POST/api/phases/{id}/end
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.

Path parameters
idstring<uuid>required

Phase identifier (UUID).

Query parameters
datestring<date>

The caller's local calendar day (YYYY-MM-DD), the default start or end day. Defaults to the server's UTC date.

Responses
200

The phase was ended.

object
400

The request body or parameters failed validation.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

404

No matching resource owned by the caller.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

Try it
Server
Authorization
Parameters
Request
curl -X POST 'https://app.skcal.fit/api/phases/3f2c1a9e-8b7d-4c6e-9f10-2a3b4c5d6e7f/end' \
  -H 'Cookie: __Secure-better-auth.session_token=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "ok": true,
  "week": 2,
  "day": 1,
  "exerciseName": "Barbell Bench Press",
  "muscle": "chest"
}

Was this page helpful?