---
title: "Put a strength routine on a date"
method: POST
path: "/strength-routines"
tags: ["Strength"]
---

# Put a strength routine on a date

`POST /strength-routines`

## Request

- Base URL: `https://bodylab.lol/api/v1`
- URL: `https://bodylab.lol/api/v1/strength-routines`
- Auth: HTTP bearer

One date, one routine. On that date it is the day's session: Body Lab prescribes nothing beside it unless another session is also put on that date. Stored as a commitment, so it's withdrawn with `POST /commitments/{id}/withdraw`, counts toward the same limits — no more than 180 days ahead or a day back (OUT_OF_HORIZON, 400), three sessions on a date (DATE_OCCUPIED, 409), 750 standing (SCHEDULE_FULL, 409) — and a connected app is held to the same rolling quota (QUOTA_EXCEEDED, 429). Sending the same routine twice — the same date, name, duration and exercises in the same order — stores one and answers with the first one's id; a routine that differs in any of those, a corrected rep count included, is stored as a new one. Every exercise must be in the catalogue: an unknown id refuses the whole routine (UNKNOWN_EXERCISE, 422, with suggestions for each), and so does a negative weight on an exercise that can't take assistance (ASSISTANCE_NOT_POSSIBLE, 422) or a unit the exercise isn't counted in (UNIT_MISMATCH, 422). A stated weight is stored as given.

## Headers

- `X-Client-Platform` string
- `X-Client-Version` string

## Request body

- object
  - `forDate` string, date, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
  - `name` string, required: What to call the session: "Upper day", "Week 3, day 2".
  - `durationS` integer: How long it takes. Left out, it's estimated from the sets, reps and rests, which is what the week counts as load before the session is logged.
  - `exercises` object[], required: In order: the runner draws them top to bottom.
    - `exerciseId` string, required: A catalogue id from `GET /exercises`. Nothing is created from a name: an id the catalogue doesn't hold refuses the routine with UNKNOWN_EXERCISE and suggestions to choose from.
    - `name` string: What the program calls the exercise, as free text. Used only to suggest catalogue ids when `exerciseId` is unknown, and kept with that refusal so Body Lab can see which exercises people are missing. Never stored with the routine and never shown as its name.
    - `sets` integer, required
    - `reps` integer, required: Reps (1–100), or seconds (1–600) for an exercise counted in seconds. Per side for a unilateral exercise.
    - `unit` 'reps' | 'seconds': Defaults to the exercise's own `defaultUnit`, and must match it when given (UNIT_MISMATCH): a plank is held for seconds and a squat counted in reps.
    - `weightKg` number, nullable: The total load in kilograms, including the bar or both dumbbells — never one implement or one side of the bar, and never pounds. Negative is assistance, only for an exercise that allows it. Leave it out to let Body Lab fill a weight on the day from the athlete's own lifting (`percentOfMax`, or `rir` alone). Not with `percentOfMax`.
    - `percentOfMax` number: A share of the athlete's estimated one-rep max, 0.3–1.0, turned into a weight on the day. Not with `weightKg`.
    - `rir` number: Reps in reserve to stop at. RPE 8 is rir 2.
    - `restS` integer: Rest between this exercise's sets. Left out, Body Lab rests it as it rests its own sessions.
    - `supersetGroup` string: Exercises sharing a letter alternate, in array order.
    - `cue` string: A short coaching cue, shown as written and attributed to whoever scheduled the routine, never as Body Lab's own words.

## Response `201`

OK

- object
  - `id` string, required: Opaque identifier.

## Other responses

- `400`: Error: OUT_OF_HORIZON.
- `401`: Error: UNAUTHORIZED.
- `409`: Error: DATE_OCCUPIED, SCHEDULE_FULL.
- `422`: Error: UNKNOWN_EXERCISE, ASSISTANCE_NOT_POSSIBLE, UNIT_MISMATCH.
- `429`: Error: QUOTA_EXCEEDED.

---

[API](https://skmtc.dev/bodylab/apis/body-lab-api.md) · [All operations](https://skmtc.dev/bodylab/apis/body-lab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bodylab/apis/body-lab-api/revisions/544c201eaf88?raw)
