---
title: "Send a prescribed session to a connected service as a structured workout"
method: POST
path: "/planned-workouts/push"
tags: ["Training"]
---

# Send a prescribed session to a connected service as a structured workout

`POST /planned-workouts/push`

## Request

- Base URL: `https://bodylab.lol/api/v1`
- URL: `https://bodylab.lol/api/v1/planned-workouts/push`
- Auth: HTTP bearer

The workout goes to the athlete's account there and onto that day in its calendar; compatible devices pick it up on their next sync. Which devices show it is decided by the sport, not by Body Lab. Sending the same session again replaces what was sent before. Also records the plan, and keeps the service's own id for it so the completed activity is matched exactly.

## Headers

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

## Request body

- object
  - `name` string, required
  - `modality` 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".
  - `blocks` object[], required
    - `label` string, required
    - `repeat` integer, required
    - `work` object, required
      - `minutes` number, required
      - `zone` integer, required: Heart-rate zone, 1–5.
      - `hrLow` number, nullable
      - `hrHigh` number, nullable
      - `powerLow` number, nullable
      - `powerHigh` number, nullable
      - `speedLowMs` number, nullable
      - `speedHighMs` number, nullable
    - `recovery` object, nullable
      - `minutes` number, required
      - `zone` integer, required: Heart-rate zone, 1–5.
      - `hrLow` number, nullable
      - `hrHigh` number, nullable
      - `powerLow` number, nullable
      - `powerHigh` number, nullable
      - `speedLowMs` number, nullable
      - `speedHighMs` number, nullable
  - `forDate` string, date, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
  - `provider` string, required

## Response `201`

OK

- object
  - `id` string, required: The prescription this push recorded.
  - `provider` string, required
  - `providerWorkoutId` string, required: What the service calls the workout. Kept so the activity that comes back is matched to this plan exactly.
  - `scheduledOn` string, date, nullable, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
  - `replacedEarlierPush` boolean, required: An earlier push of this session for this day was superseded.

## Other responses

- `401`: Error: UNAUTHORIZED.
- `409`: Error: NOT_CONNECTED, REAUTH_REQUIRED.
- `422`: Error: PUSH_NOT_SUPPORTED.
- `502`: Error: PROVIDER_UNAVAILABLE.

---

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