---
search:
  tags:
    - Training
    - POST
seo:
  description: >-
    Logs sets the way a person says them ("bench 185 for 8, 8, 7"): finds the
    exercise in a… Reference for the POST /api/training/log endpoint in the
    skcal API.
sidebar:
  label: Log sets by exercise
  badge: POST
title: Log sets by exercise
type: openapi-operation
---
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`

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

The exercise and the sets done.

- `exercise` (string) — Exercise name or muscle as the user said it; matched against the session.
- `slotId` (string) — Exact slot id, instead of a name.
- `mesoId` (string) — Mesocycle (default the active one).
- `week` (integer) — Week (default the next session due).
- `day` (integer) — Day (default the next session due).
- `sets` (object[], required) — The sets, in order.

Request body example:

```json
{
  "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
    }
  ]
}
```

**Responses**

- `200` — The sets were logged.
- `400` — The request body or parameters failed validation.

Response example, 200:

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