Add or update a goal
upsert_goalCreate or update a training goal (pass id to update). target.goal_type selects the
shape: milestone (point target — exercise_id+value, or bodyweight+baseline_value),
weekly_volume (muscle+band: mev|mev_mav|mav — "train X at least at MEV every week"),
trend (exercise_id+metric, no value — "just keep it climbing", no fixed finish line),
maintenance (baseline_value+tolerance_pct, exercise_id and/or muscle optional, unset means
total session volume — "don't lose ground"), or omit goal_type for a plain process goal
(metric=sessions_per_week).
Any exercise_id must be an id from the user's catalog (list_exercises; new ones via
upsert_exercise): unknown ids are rejected, and a synonymous duplicate would split the
exercise's history. review_date is the goal's scheduled check-in date.
featured=true makes this the ONE goal on the app's featured-goal card and automatically un-features any other active goal. The server rejects featured on a frequency goal; those live in the adherence widget only.
Goal succession is two records: the earlier goal with status=achieved (never featured, which the server enforces) and the next goal with supersedes_goal_id=<earlier goal's id>. The app never transitions a goal on its own.
Coach-proposed goals carry ratified=false until the user agrees. Goals are not deleted: status=revised/abandoned/achieved supersedes them, so history survives.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||