Update a workout template
update_training_frameUpdate a library workout template. Read it first with get_training_frame, apply your changes in reasoning, then send the patch — nodes kept from the read keep their "id" (the server preserves everything the web editor set on them; a node without id is created new). If no schema field expresses a detail of the coach's intent, put it in the comment of the relevant node — never approximate it into another field, never drop it. If a request expands to more than 3 write operations, list the computed dates/targets and get explicit confirmation before writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Public id of the event to update. | |
| patch | Yes | RFC 7396 merge-patch of the envelope: omitted fields stay untouched, null clears a field, provided values replace it. "workout", when provided, replaces the whole structured content (full-replace): re-emit the entire array, preserving the "id" of every node you keep; null removes it and zeroes the duration and distance it synced. | |
| revision | No | Revision token from your last get_* read — optional but strongly recommended. On mismatch the server rejects with the fresh state: re-read, re-apply your change, re-emit. It only detects concurrent edits — no version history, no server-side undo: to be able to restore, keep the JSON you read before modifying and resubmit it without node ids. |