Create Workouts
create_workoutRecord one or more COMPLETED workouts. Use this to log a session the user has just finished, or to import training history from another app. Maximum 25 workouts per call.
Each workout needs: client_ref (a stable key from your source data, e.g. "strong-row-412" or "session-2024-03-11"), end_time, and exercises with their sets. Every exercise_id must exist in the catalog - use search_exercises to find them. An unrecognised exercise_id rejects that workout and returns up to three suggested matches, so correct the id and resubmit that item.
client_ref makes calls safe to repeat: the same client_ref always maps to the same workout, so a retry after a timeout updates rather than duplicating. Use the SAME client_ref when resubmitting a failed item.
Partial success is normal. Read results[] for the per-item outcome and next_action for what to do next; a failed item never prevents the others from being written.
Effort: send rir (an integer) if the source has RIR, or rpe (1-10, half steps fine) if it has RPE — never both. Timed and distance work (planks, carries, sled) go as reps 0 with duration_s or distance_m. A missed attempt is reps 0 with is_failure.
IMPORTING HISTORY: send workouts in chunks of 25, the same import_id on every chunk, and set is_final=true on the LAST chunk only. Workouts older than 7 days are stored as data and deliberately do NOT generate insights, recommendations, or changes to current training state - analysing an old session would overwrite the athlete's present-day training picture. Say so rather than promising insights that will not appear. A recent session (within 7 days) does update their training state.
For very large migrations, be honest about the cost: transcribing several hundred workouts takes a long time and risks per-field errors. Ask whether the full history is wanted, or only recent months.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| is_final | No | Set true on the LAST chunk of a multi-chunk import (or for a single recent session) so any pending analysis runs. | |
| workouts | Yes | 1 to 25 completed workouts. |