Prescribe a workout
Plans a workout for the user on a given date, from scratch or from one of your training collections.
Vekta converts the steps for the user and estimates the workout from them: see Workout structure.
Unless it's hidden, a workout with steps is sent to the user's connected devices (Garmin, Wahoo, COROS, Zwift, Hammerhead). deviceSyncs tells you what happened on each one.
When you create it for one of your athletes, it's added to the workspace where you coach them. If you coach them in several workspaces, send workspaceId.
Responds with:
404 not_found: the collection isn't yours,workspaceIdisn't a workspace where you coach this athlete, or the user doesn't exist or isn't one of your athletes.403 subscription_required: the user (or you, forme) doesn't have an active Vekta subscription.400 bad_request:titleorsportis missing (without a collection), a field, target or zones type the sport doesn't support, steps on a sport other than cycling, running and swimming, a target that needs a zone or metric the user doesn't have,workspaceIdis sent formeor missing while you coach the athlete in several workspaces, or other invalid parameters or payload.
Your Vekta API key, sent as Authorization: Bearer vk_..., or an OAuth access token of an app you connected, sent as Authorization: Bearer <access token>.
In: header
Path Parameters
Id of a user you have access to (see GET /users), or me for yourself
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Id of one of your training collections (see GET /training-collections) to start from. The fields you send replace the collection's values.
Local date (YYYY-MM-DD)
dateRequired without trainingCollectionId. To change the sport of a collection with steps, also send a new structure (or structure: null).
"cycling" | "running" | "swimming" | "training" | "multisport" | "walking" | "crossCountrySkiing" | "alpineSkiing" | "rowing" | "hiking" | "hiit" | "fitnessEquipment" | "racket" | "tennis" | "golf" | "standUpPaddleboarding" | "snowboarding" | "meditation" | "kayaking" | "soccer" | "rockClimbing" | "iceSkating" | "windsurfing" | "mixedMartialArts" | "sailing" | "mountaineering" | "surfing" | "boating" | "basketball" | "eBiking" | "hockey" | "snowshoeing" | "inlineSkating" | "kitesurfing" | "mobility" | "tactical" | "hunting" | "fishing" | "jumpRope" | "boxing" | "floorClimbing" | "snorkeling" | "motorcycling" | "baseball" | "paddling" | "canoeing" | "rafting" | "rugby" | "discGolf" | "wakeboarding" | "wakesurfing" | "waterTubing" | "waterSkiing" | "waterSport" | "snowmobiling" | "dance" | "flying" | "americanFootball" | "diving" | "cricket" | "volleyball" | "wheelchairPushWalk" | "wheelchairPushRun" | "paraSport" | "hangGliding" | "skyDiving" | "jumpmaster" | "horsebackRiding" | "driving" | "motorSports" | "shooting" | "archery" | "winterSport" | "videoGaming" | "geocaching" | "lacrosse" | "poolApnea" | "teamSport" | "grinding" | "transition" | "generic"Only you can see it, and it isn't sent to the athlete's devices while it's hidden. Defaults to false.
The workspace to create it in, when the user is one of your athletes. Only needed if you coach them in several workspaces. Not accepted for me.
Must be a sub sport of sport
"generic" | "treadmill" | "street" | "trail" | "track" | "spin" | "indoorCycling" | "road" | "mountain" | "downhill" | "recumbent" | "cyclocross" | "handCycling" | "trackCycling" | "indoorRowing" | "elliptical" | "stairClimbing" | "lapSwimming" | "openWater" | "flexibilityTraining" | "strengthTraining" | "warmUp" | "match" | "exercise" | "challenge" | "indoorSkiing" | "cardioTraining" | "indoorWalking" | "eBikeFitness" | "bmx" | "casualWalking" | "speedWalking" | "bikeToRunTransition" | "runToBikeTransition" | "swimToBikeTransition" | "atv" | "motocross" | "backcountry" | "resort" | "rcDrone" | "wingsuit" | "whitewater" | "skateSkiing" | "yoga" | "pilates" | "indoorRunning" | "gravelCycling" | "eBikeMountain" | "commuting" | "mixedSurface" | "navigate" | "trackMe" | "map" | "singleGasDiving" | "multiGasDiving" | "gaugeDiving" | "apneaDiving" | "apneaHunting" | "virtualActivity" | "obstacle" | "breathing" | "ccrDiving" | "sailRace" | "expedition" | "ultra" | "indoorClimbing" | "bouldering" | "hiit" | "indoorGrinding" | "huntingWithDogs" | "amrap" | "emom" | "tabata" | "esport" | "triathlon" | "duathlon" | "brick" | "swimRun" | "adventureRace" | "truckerWorkout" | "pickleball" | "padel" | "indoorWheelchairWalk" | "indoorWheelchairRun" | "indoorHandCycling" | "field" | "ice" | "ultimate" | "platform" | "squash" | "badminton" | "racquetball" | "tableTennis" | "overland" | "trollingMotor" | "flyCanopy" | "flyParaglide" | "flyParamotor" | "flyPressurized" | "flyNavigate" | "flyTimer" | "flyAltimeter" | "flyWx" | "flyVfr" | "flyIfr" | "dynamicApnea" | "enduro" | "rucking" | "rally" | "poolTriathlon" | "eBikeEnduro" | "timeTrial"Send null to remove the steps.
Show attributesHide attributes
StructurePrescriptionStepInputtype: "step"
"step""warm up" | "active" | "intra-recovery" | "rest" | "cool down" | "maximum"Show attributesHide attributes
Freetype: "free"
The athlete decides when to move on
"free"Durationtype: "duration"
"duration"In seconds
0 < valueDistancetype: "distance"
"distance"In meters
0 < valueAll targets are optional, and each sport accepts different ones. See Workout structure.
Show 6 attributesHide 6 attributes
Show attributesHide attributes
Zone
Name of one of the athlete's power zones
Percentage
In % of the athlete's critical power
0 <= valueIn % of the athlete's critical power
0 <= valueAbsolute
In watts
0 <= valueIn watts
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's heart rate zones
Percentage
In % of the athlete's max heart rate
0 <= valueIn % of the athlete's max heart rate
0 <= valueAbsolute
In bpm
0 <= valueIn bpm
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's speed zones
Percentage
In % of the athlete's critical speed
0 <= valueIn % of the athlete's critical speed
0 <= valueAbsolute
In m/s
0 <= valueIn m/s
0 <= valueShow 2 attributesHide 2 attributes
In rpm (spm for running)
0 <= valueIn rpm (spm for running)
0 <= value"freestyle" | "backstroke" | "breaststroke" | "butterfly" | "drill" | "mixed" | "im" | "imByRound" | "rimo"Swim rest spent at the wall, with no target
StructurePrescriptionRepetitionInputtype: "repetition"
A block of steps done nRepetitions times. Repetitions can be nested up to 3 levels deep.
"repetition"1 <= value <= 90071992547409911 <= itemsShow attributesHide attributes
StructurePrescriptionStepInputtype: "step"
"step""warm up" | "active" | "intra-recovery" | "rest" | "cool down" | "maximum"Show attributesHide attributes
Freetype: "free"
The athlete decides when to move on
"free"Durationtype: "duration"
"duration"In seconds
0 < valueDistancetype: "distance"
"distance"In meters
0 < valueAll targets are optional, and each sport accepts different ones. See Workout structure.
Show 6 attributesHide 6 attributes
Show attributesHide attributes
Zone
Name of one of the athlete's power zones
Percentage
In % of the athlete's critical power
0 <= valueIn % of the athlete's critical power
0 <= valueAbsolute
In watts
0 <= valueIn watts
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's heart rate zones
Percentage
In % of the athlete's max heart rate
0 <= valueIn % of the athlete's max heart rate
0 <= valueAbsolute
In bpm
0 <= valueIn bpm
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's speed zones
Percentage
In % of the athlete's critical speed
0 <= valueIn % of the athlete's critical speed
0 <= valueAbsolute
In m/s
0 <= valueIn m/s
0 <= valueShow 2 attributesHide 2 attributes
In rpm (spm for running)
0 <= valueIn rpm (spm for running)
0 <= value"freestyle" | "backstroke" | "breaststroke" | "butterfly" | "drill" | "mixed" | "im" | "imByRound" | "rimo"Swim rest spent at the wall, with no target
StructurePrescriptionNestedRepetitionInputtype: "repetition"
A repetition inside another repetition
"repetition"1 <= value <= 90071992547409911 <= itemsShow attributesHide attributes
StructurePrescriptionStepInputtype: "step"
"step""warm up" | "active" | "intra-recovery" | "rest" | "cool down" | "maximum"Show attributesHide attributes
Freetype: "free"
The athlete decides when to move on
"free"Durationtype: "duration"
"duration"In seconds
0 < valueDistancetype: "distance"
"distance"In meters
0 < valueAll targets are optional, and each sport accepts different ones. See Workout structure.
Show 6 attributesHide 6 attributes
Show attributesHide attributes
Zone
Name of one of the athlete's power zones
Percentage
In % of the athlete's critical power
0 <= valueIn % of the athlete's critical power
0 <= valueAbsolute
In watts
0 <= valueIn watts
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's heart rate zones
Percentage
In % of the athlete's max heart rate
0 <= valueIn % of the athlete's max heart rate
0 <= valueAbsolute
In bpm
0 <= valueIn bpm
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's speed zones
Percentage
In % of the athlete's critical speed
0 <= valueIn % of the athlete's critical speed
0 <= valueAbsolute
In m/s
0 <= valueIn m/s
0 <= valueShow 2 attributesHide 2 attributes
In rpm (spm for running)
0 <= valueIn rpm (spm for running)
0 <= value"freestyle" | "backstroke" | "breaststroke" | "butterfly" | "drill" | "mixed" | "im" | "imByRound" | "rimo"Swim rest spent at the wall, with no target
StructurePrescriptionInnermostRepetitionInputtype: "repetition"
A repetition at the third level. Can only contain steps.
"repetition"1 <= value <= 90071992547409911 <= itemsShow 4 attributesHide 4 attributes
"step""warm up" | "active" | "intra-recovery" | "rest" | "cool down" | "maximum"Show attributesHide attributes
Freetype: "free"
The athlete decides when to move on
"free"Durationtype: "duration"
"duration"In seconds
0 < valueDistancetype: "distance"
"distance"In meters
0 < valueAll targets are optional, and each sport accepts different ones. See Workout structure.
Show 6 attributesHide 6 attributes
Show attributesHide attributes
Zone
Name of one of the athlete's power zones
Percentage
In % of the athlete's critical power
0 <= valueIn % of the athlete's critical power
0 <= valueAbsolute
In watts
0 <= valueIn watts
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's heart rate zones
Percentage
In % of the athlete's max heart rate
0 <= valueIn % of the athlete's max heart rate
0 <= valueAbsolute
In bpm
0 <= valueIn bpm
0 <= valueShow attributesHide attributes
Zone
Name of one of the athlete's speed zones
Percentage
In % of the athlete's critical speed
0 <= valueIn % of the athlete's critical speed
0 <= valueAbsolute
In m/s
0 <= valueIn m/s
0 <= valueShow 2 attributesHide 2 attributes
In rpm (spm for running)
0 <= valueIn rpm (spm for running)
0 <= value"freestyle" | "backstroke" | "breaststroke" | "butterfly" | "drill" | "mixed" | "im" | "imByRound" | "rimo"Swim rest spent at the wall, with no target
The main target of the steps. Required when you send structure, and not accepted without it. See Workout structure.
"power" | "speed" | "heartRate"In seconds. With a structure, Vekta computes it from the steps when it can. See Workout structure.
In meters. Only for sports with a distance. With a structure, Vekta computes it from the steps when it can. See Workout structure.
In meters. Only for sports with an elevation gain
In kJ. Only for sports with a work estimate. With a structure, Vekta computes it from the steps when it can. See Workout structure.
"neuromuscular" | "anaerobic" | "vo2max" | "threshold" | "tempo" | "aerobic" | "recovery" | "lactate clearance" | "durability" | "activation" | "test" | "race" | "heat"In g/h. Only for endurance sports. If you don't send it, Vekta can estimate it from the steps. See Workout structure.
10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/users/me/training-prescriptions" \ -H "Content-Type: application/json" \ -d '{ "date": "2026-08-12" }'{ "trainingPrescription": { "id": "tpr_01JK4W2N9XQ3F5H7B8C6D2E9GT", "prescribedBy": "usr_01JGXW3KQ2B8C4D5E6F7G8H9J0", "workspaceId": "wke_01JGXW3KQ2B8C4D5E6F7G8H9J0", "hidden": false, "date": "2026-08-12", "time": "06:30:00", "title": "3 x 12 min threshold", "description": null, "sport": "cycling", "subSport": "road", "trainingStimulus": "threshold", "structure": [ { "type": "step", "label": "active", "intensity": { "vektaIntensity": "threshold", "zone": "Z4", "stroke": "freestyle", "passive": true, "fromPower": "zone", "fromHeartRate": "zone", "minPower": 250, "maxPower": 280, "minPowerThresholdPercentage": 95, "maxPowerThresholdPercentage": 106, "minHeartRate": 160, "maxHeartRate": 172, "minMaxHeartRatePercentage": 85, "maxMaxHeartRatePercentage": 91, "minCadence": 85, "maxCadence": 95, "fromSpeed": "zone", "minSpeed": 3.6, "maxSpeed": 4.2, "minSpeedThresholdPercentage": 92, "maxSpeedThresholdPercentage": 104 }, "length": { "type": "free" } } ], "zonesType": "power", "distance": null, "duration": 4500, "freeDuration": 600, "elevationGain": null, "averagePower": 210, "work": 950, "calories": 980, "rpe": 7, "carbIntake": 60, "comment": null, "activityId": null }, "deviceSyncs": [ { "provider": "garmin", "action": "created", "succeeded": true, "message": "Pushed to the device." } ]}