---
search:
  tags:
    - Training
    - PATCH
seo:
  description: >-
    Sets a set's weight and reps (logging it), un-logs it with done false, or
    edits… Reference for the PATCH /api/training/sets/{id} endpoint in the skcal
    API.
sidebar:
  label: Log or edit a set
  badge: PATCH
title: Log or edit a set
type: openapi-operation
---
Sets a set's weight and reps (logging it), un-logs it with done false, or edits its targets.

`PATCH /api/training/sets/{id}`

**Request body** (`application/json`, required)

The set fields to log or change.

- `weightLb` (number | null) — Load in pounds.
- `reps` (integer | null) — Reps done.
- `done` (boolean) — True logs the set; false un-logs it.
- `targetWeightLb` (number | null) — Target load in pounds.
- `targetReps` (integer | null) — Target reps.
- `loggedAt` (string | integer) — When the set was finished (ISO 8601 or epoch ms); logs the set at that time. Without it, logging stamps now and editing a done set keeps its time.

Request body example:

```json
{
  "weightLb": 185,
  "reps": 8,
  "done": true,
  "targetWeightLb": 190,
  "targetReps": 8,
  "loggedAt": "2026-10-25T18:42:00-05:00"
}
```

**Responses**

- `200` — The updated set.
- `400` — The request body or parameters failed validation.
- `404` — No matching resource owned by the caller.

Response example, 200:

```json
{
  "ok": true,
  "week": 2,
  "day": 1,
  "exerciseName": "Barbell Bench Press",
  "muscle": "chest"
}
```
