---
title: "Sessions the athlete has said are happening, by date"
method: GET
path: "/commitments"
tags: ["Training"]
---

# Sessions the athlete has said are happening, by date

`GET /commitments`

## Request

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

A date range rather than one day, because the point of a commitment is the days around it: the engine plans the week with them in it. Withdrawn commitments are left out unless asked for.

## Query parameters

- `from` string, date, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
- `to` string, date, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
- `includeWithdrawn` boolean

## Headers

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

## Response `200`

OK

- object
  - `commitments` object[], required
    - `id` string, required: Opaque identifier.
    - `kind` string, required: session: a session described by its sport, duration and intensity. strength_routine: a strength routine, whose exercises `GET /strength-routines` returns. Withdrawn the same way, either kind. Known values: session, strength_routine. Treat unknown values as "other".
    - `forDate` string, date, required: The day it happens, on the athlete's own calendar.
    - `name` string, required: What the athlete called it.
    - `sport` string, required: Sport, from the engine's vocabulary (packages/engine/src/sports.ts), e.g. road_biking, running, hiking, strength_training. Known values: road_biking, running, hiking, strength_training, other. Treat unknown values as "other".
    - `durationS` integer, required: How long the athlete expects it to take.
    - `intensity` string, required: How hard the athlete says this session usually is. easy: steady aerobic, and the week may still put a hard day beside it. mixed: it has efforts in it. hard: it is the day's hard session. mixed and hard both make the day a hard one, which is what stops the engine prescribing a second hard day next to it. Known values: easy, mixed, hard. Treat unknown values as "other".
    - `withdrawnAt` string, date-time, nullable, required: An instant: ISO-8601 with offset, e.g. 2026-09-13T06:30:00Z.
    - `scheduledBy` string, nullable, required: The connected app that put this on the calendar, as its OAuth client id — the `clientId` that `GET /schedule/apps` names and `POST /schedule/apps/withdraw` takes. Null when the athlete entered it themselves, in any of their own apps.
    - `createdAt` string, date-time, required: An instant: ISO-8601 with offset, e.g. 2026-09-13T06:30:00Z.

## Other responses

- `401`: Error: UNAUTHORIZED.

---

[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)
