Skip to content

Mutations

Write operations. They act on the caller’s own data unless prefixed with admin.

Create an invite code.

Returns Invite! · Access Admins only

Revoke an unused invite code.

Returns Boolean! · Access Admins only

Argument Type Description
code String! Code.

Disable (sign out and lock out everywhere) or re-enable an account.

Returns Boolean! · Access Admins only

Argument Type Description
disabled Boolean! Disable or enable.
reason String Shown in the audit log.
userId ID! User.

Cancel a scheduled rest notification (rest skipped or workout ended).

Returns Boolean! · Access Signed-in user (own data only)

Return a date to the weekly plan.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
date Date! Date.

Create a personal API key for the GraphQL API. The full key is in the result only; it cannot be shown again. Needs a signed-in session (an API key cannot create keys).

Returns CreatedApiKey! · Access Signed-in user (own data only)

Argument Type Description
input CreateApiKeyInput! Name, access and expiry.

Share the plan by link. The link holds a snapshot (routines, week, custom exercises) and expires after 30 days.

Returns PlanShare! · Access Signed-in user (own data only)

Delete a day’s reading.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
date Date! Date.

Delete a custom exercise: it leaves routines; logged workouts keep their sets and its name.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
id ID! Exercise id.

Delete a routine. Days planned with it become rest days; logged workouts stay.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
id ID! Routine id.

Delete a workout (or discard a running one).

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
id ID! Workout id.

End an app’s access now: removes the user’s consent and every token the app holds for them.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
clientId ID! OAuth client id from connectedApps.

Finish a workout: saves it, reports records and what was trained, and records body weight if entered.

Returns FinishResult! · Access Signed-in user (own data only)

Argument Type Description
input WorkoutInput! The workout, with finishedAt.

Report live workout progress (sent periodically while a workout is on screen).

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
input HeartbeatInput! Progress.

Write history imported from another app. Days that already have workouts are skipped, so running it twice never duplicates anything.

Returns ImportResult! · Access Signed-in user (own data only)

Argument Type Description
input ImportHistoryInput! Parsed history.

Merge a shared plan file into the user’s plan. Nothing of theirs is overwritten except, optionally, the week schedule.

Returns ImportPlanResult! · Access Signed-in user (own data only)

Argument Type Description
plan JSON! Plan file contents.
takeWeek Boolean Replace Monday–Sunday with the file’s schedule.

Add a plan shared by link. Returns the number of routines added.

Returns Int! · Access Signed-in user (own data only)

Argument Type Description
takeWeek Boolean Take the week schedule too.
token String! Share token.

Add a ready-made plan. The week schedule is only filled when it is empty.

Returns [Routine!]! · Access Signed-in user (own data only)

Argument Type Description
kind StarterKind! Which plan.

Record body weight for a day (one reading per day; the latest wins).

Returns BodyweightEntry! · Access Signed-in user (own data only)

Argument Type Description
input BodyweightInput! Reading.

Remove the photo of one of your custom exercises.

Returns CustomExercise! · Access Signed-in user (own data only)

Argument Type Description
exerciseId ID! Custom exercise id.

Set routine display order.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
ids [ID!]! Routine ids in order.

Move a day’s session to another date; the original date becomes a rest day.

Returns [PlanOverride!]! · Access Signed-in user (own data only)

Argument Type Description
from Date! Date to move from.
to Date! Date to move to.

Delete all training data (plan, workouts, weigh-ins, settings). The account stays.

Returns Boolean! · Access Signed-in user (own data only)

Replace all of the user’s data with a backup made by viewer.backup.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
backup JSON! Backup contents.

Revoke a personal API key; requests with it fail from now on. Needs a signed-in session.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
id ID! Key id from apiKeys.

Sign a browser or CLI out of the account. Needs a signed-in session.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
id ID! Session id from viewer.sessions.

Create or edit a custom exercise.

Returns CustomExercise! · Access Signed-in user (own data only)

Argument Type Description
input CustomExerciseInput! The exercise.

Create or replace a routine.

Returns Routine! · Access Signed-in user (own data only)

Argument Type Description
input RoutineInput! The routine.
position Int Display position.

Save a workout in progress (or edit a finished one). Idempotent by id, so an offline queue can replay it.

Returns Workout! · Access Signed-in user (own data only)

Argument Type Description
input WorkoutInput! The workout.

Schedule the “rest is over” notification so it arrives even with the app closed. Replaces any earlier one.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
body String! Notification body (already translated).
seconds Int! Seconds from now (1–900).
title String! Notification title (already translated).

Send a test notification to all of the user’s browsers. Returns how many were delivered.

Returns Int! · Access Signed-in user (own data only)

Set the photo of one of your custom exercises: a JPEG or WebP up to 1 MB, base64-encoded. Location, camera and other metadata are removed before it is stored.

Returns CustomExercise! · Access Signed-in user (own data only)

Argument Type Description
exerciseId ID! Custom exercise id.
image String! The image file, base64 (no data: prefix).

Change one date without touching the weekly plan (null routine = rest).

Returns PlanOverride! · Access Signed-in user (own data only)

Argument Type Description
date Date! Date.
routineId ID Routine; omit for rest.

Set per-exercise settings (step, added load, rep ceiling, working weight…).

Returns ExerciseSetting! · Access Signed-in user (own data only)

Argument Type Description
input ExerciseSettingInput! Settings.

Star or unstar an exercise; favourites sort first in the library and the picker.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
exerciseId ID! Exercise.
favourite Boolean! Starred.

Add a password to this account so it can also sign in with its email and password. Only when the instance allows password sign-in, for accounts that have none yet and are not guests; to change an existing password use the auth API (/api/auth/change-password). Needs a signed-in session.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
password String! New password, 8–128 characters.

Plan a routine on a weekday (null = rest).

Returns [WeekDay!]! · Access Signed-in user (own data only)

Argument Type Description
routineId ID Routine; omit for a rest day.
weekday Int! Monday = 0 … Sunday = 6.

Register this browser for push notifications.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
input PushSubscriptionInput! Subscription.

Unregister a browser.

Returns Boolean! · Access Signed-in user (own data only)

Argument Type Description
endpoint String! Subscription endpoint.

Change preferences.

Returns Settings! · Access Signed-in user (own data only)

Argument Type Description
input SettingsInput! Fields to change.