Update a training prescription
Changes a prescription. Fields you don't send stay the same.
New steps are converted with the user's current zones and metrics. Some fields can't be changed while the steps decide them: see Workout structure.
Changes are sent to the workout on the user's devices. deviceSyncs tells you what happened on each one.
Responds with:
404 not_found: the prescription doesn't exist, or isn't yours or one of your athletes'.403 subscription_required: that user doesn't have an active Vekta subscription.403 forbidden: the prescription was created in a workspace where you aren't a coach or admin, or someone other than its creator changeshidden.400 bad_request: an empty payload, a field, target or zones type the sport doesn't support, a duration, distance or work that can't be changed, a sport change without a new structure, a target that needs a zone or metric the user doesn't have, 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 training prescription, from GET /users/{userId}/training-prescriptions
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= propertiesLocal date (YYYY-MM-DD)
dateFields the new sport doesn't have are reset, unless you send them. If the prescription has 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 the prescription's creator can change this. Unhiding sends the workout to the athlete's devices, and hiding removes it.
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 PATCH "https://example.com/training-prescriptions/tpr_01JK4W2N9XQ3F5H7B8C6D2E9GT" \ -H "Content-Type: application/json" \ -d '{}'{ "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." } ]}