Edit a custom exercise
update_custom_exerciseChanges- What it does
- Changes or deletes something you had. Your assistant can ask you to confirm first.
- Permission
- Exercises, change
exercises:write
What your assistant is told
Edit one of the USER'S OWN exercises — never a catalog one. **Only what you pass changes**; everything you omit is left exactly as it is.
The one you will reach for: an exercise the Hevy import created carries **no muscle at all** (the export doesn't say, and we refuse to guess), so its sets count towards volume and contribute nothing to the user's muscle split or recovery. Setting primaryMuscle fixes that permanently. Same for a hold the import logged as reps: set trackingMode: "seconds". Sets already logged keep the numbers the user entered.
loadMode is **locked once the exercise has logged sets** and the call is refused: one weight per set is read through it, so changing it would rewrite what every past set meant. A different loading is a different exercise — create one.
Confirm an edit with the user first: the name is what they see from then on, and the muscles are a claim about their own training. Use get_exercise to read the current values and the vocabularies (pattern, bodyRegion, equipment slugs) before calling.
Parameters
exercisetext, requiredThe exercise: the numericidof one of the user's own (they have no slug). A catalog exercise is refused.nametext, optionalA new name. Omit to leave it; a blank name is refused.notestext, optionalTheir own note about it — setup, which machine. An empty string clears it.trackingModetext, optionalHow a set is counted: "reps" | "seconds" | "distance". Editable even with sets logged.loadModetext, optionalHow a set's single weight reads: "weight" | "bodyweight" | "bodyweight_plus" (bodyweight + it) | "bodyweight_signed" (the same, and a NEGATIVE weightKg is assistance) | "band" (an ESTIMATE of band tension, never added to volume) | "none". REFUSED once the exercise has logged sets.unilateraltrue or false, optionalTrue when all reps are done on one side before switching. An alternating two-arm lift is false.patterntext, optionalA movement pattern slug, asget_exercisereports one ("vertical-pull"). This is what makessuggest_substitutionable to answer for it. Empty string clears it.bodyRegiontext, optional"upper" | "lower" | "core" | "full-body". Empty string clears it.primaryMuscletext, optionalDisplay-group slug of the primary mover ("chest", "lats"). Passing muscles REPLACES the whole set rather than adding to it.secondaryMuscleslist of object, optionalSecondary muscles, each with an optional loadRatio in (0, 1] (default 0.5). Replaces the existing secondaries.equipmentlist of text, optionalEverything a set of it REQUIRES, as equipment slugs fromlist_equipment— all of them, not one of them. Replaces the whole list; an empty array means it needs nothing.