{"openapi":"3.1.0","info":{"title":"CloudFit API","version":"v1","description":"Work with CloudFit locations: read, build, edit, publish and delete workouts; manage custom exercises and the media library, with uploads; plan the class schedule; and read workout history. Beta.\n\nGuides: the [technical guide](/docs/guide) (signing in, scopes, limits, revisions, retries, uploads, errors) and [connecting AI apps with MCP](/docs/mcp).\n\nAuthenticate with a personal token from the CloudFit app (Settings → AI & API Access): `Authorization: Bearer cf_api_live_…`. A location is one gym, studio or HQ in CloudFit; tokens are scoped per location, and a location can use workouts and exercises from its HQ.\n\nLimits: 120 requests a minute per token and 240 per user; validate and preview 60 a minute; changes 30 a minute per user and 30 per location, with daily limits on some (see the technical guide).\n\nEdits, deletes and publishing need the revision you read (`If-Match` with the `ETag`; optional for duplicates); commits that create something need an `Idempotency-Key`, so a retry after a lost response is safe. The technical guide has the full table. Errors are RFC 9457 problems with a stable `code`.\n\n## Errors\n\nEvery error has a stable `code`; MCP tool errors carry the same code and status.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `cursor_invalid` | 400 | The cursor is from another listing or was changed |\n| `idempotency_key_invalid` | 400 | The `Idempotency-Key` has characters or a length it can’t have |\n| `idempotency_key_required` | 400 | Send an `Idempotency-Key` header |\n| `if_match_invalid` | 400 | `If-Match` isn’t a revision this API gave out |\n| `request_invalid` | 400 | The body or a query parameter doesn’t match the schema; `details` lists the issues |\n| `unauthenticated` | 401 | No token, or one that is invalid, expired or revoked |\n| `permission_denied` | 403 | Your role at this location doesn’t allow this |\n| `scope_missing` | 403 | The token lacks the scope this route needs at this location (`details.scope`) |\n| `exercise_not_found` | 404 | No exercise with that ID in this location’s own library |\n| `not_found` | 404 | No such location, or no such workout, class or other item there, or one the token can’t see |\n| `route_not_found` | 404 | No such route |\n| `upload_not_found` | 404 | No such upload for this location and account |\n| `method_not_allowed` | 405 | The route doesn’t take this method; see `Allow` |\n| `exercise_has_media` | 409 | The exercise already has media; replacing it isn’t available through the API yet |\n| `exercise_name_taken` | 409 | The library already has an exercise with that name |\n| `exercise_processing` | 409 | The exercise’s media is still uploading or processing |\n| `idempotency_conflict` | 409 | This `Idempotency-Key` was used for a different request |\n| `media_processing` | 409 | The video is still being processed; try again soon |\n| `schedule_conflict` | 409 | Some classes clash, so nothing was saved (`details.conflicts` lists them) |\n| `upload_not_ready` | 409 | Nothing has been uploaded to the link yet; check again once it has |\n| `workout_name_unavailable` | 409 | No unique name could be found for the workout |\n| `workout_scheduled` | 409 | The workout has upcoming classes, here or at a location using it; remove them first (`details.classes` lists up to 10, `details.count` says how many) |\n| `upload_expired` | 410 | The upload expired; create a new upload link |\n| `revision_stale` | 412 | It changed since you read it: read it again (a schedule batch: preview it again), then retry |\n| `body_too_large` | 413 | The body is over 2 MiB |\n| `unsupported_media_type` | 415 | Send JSON (`application/json`) |\n| `after_module_invalid` | 422 | `afterModuleId` isn’t a module on the target track |\n| `assignment_id_invalid` | 422 | An `assignmentId` isn’t from this workout’s current revision |\n| `canvas_needs_saved_module` | 422 | Add the whiteboard first, then set its `canvasImage` in another edit |\n| `chatgpt_files_invalid` | 422 | Send 1 to 10 attached files a call, and no more `exercises` entries than files (`add_exercises_from_files`) |\n| `demo_link_invalid` | 422 | A demos module must link modules with exercises in this workout |\n| `demo_source_removed` | 422 | A removed module is still linked by a demos module; change the demos too |\n| `exercise_details_invalid` | 422 | Equipment or categories outside those built-in exercises use (`details` lists the choices) |\n| `exercise_download_invalid` | 422 | Send 1 to 25 exercise IDs |\n| `exercise_import_closed` | 422 | The import closed after 24 hours |\n| `exercise_import_duplicate` | 422 | An import file names an exercise another file in the same import already does |\n| `exercise_import_files_invalid` | 422 | Send 1 to 50 files a call |\n| `exercise_import_limit_reached` | 422 | The import allowance (200 exercises per 7 days, unless CloudFit raised it) has no room; `details` has the numbers |\n| `exercise_library_full` | 422 | The location’s library is at its exercise limit |\n| `exercise_library_inherited` | 422 | This location uses its HQ’s exercise library; use the HQ location |\n| `exercise_name_invalid` | 422 | Exercise names are 3 to 100 letters, numbers, spaces and simple punctuation |\n| `exercise_reference_invalid` | 422 | An exercise reference isn’t valid |\n| `exercise_rename_invalid` | 422 | Some renames can’t be done, so nothing was changed (`details.problems` says which and why) |\n| `exercise_replaces_builtin` | 422 | A built-in exercise’s name; send replaceBuiltIn: true to replace its video in this location |\n| `exercise_unavailable` | 422 | An exercise isn’t available here; search for exercises this location can use |\n| `exercise_update_invalid` | 422 | Some updates can’t be done, so nothing was changed (`details.problems` says which and why) |\n| `exercise_upload_type` | 422 | The filename doesn’t end in a video or image type CloudFit takes |\n| `flexi_timing_get_ready` | 422 | An exercises module with flexi timing has a get-ready; remove it in the app |\n| `flexi_timing_governs` | 422 | Flexi timing decides this module’s timing; switch to simple timing to change it |\n| `folder_name_invalid` | 422 | Folder names are 3 to 60 characters |\n| `folder_unknown` | 422 | A folder the location doesn’t have; list or create folders first (`details.folders`) |\n| `history_range_invalid` | 422 | `since` or `before` isn’t an ISO 8601 date and time, or `since` isn’t earlier than `before` |\n| `image_invalid` | 422 | A whiteboard image belongs to another workout |\n| `main_track_missing` | 422 | A workout needs at least one module on track 1, the main track |\n| `main_track_untimed` | 422 | The main track has no module with a timing |\n| `media_not_found` | 422 | The media isn’t in a library this location can use; list media for a valid ID |\n| `media_upload_type` | 422 | The filename doesn’t end in an image type (jpg, jpeg, png, webp) or a video type (mp4, mov, m4v) |\n| `module_format_outdated` | 422 | Open and save the module in the app once before changing it here |\n| `module_has_no_exercises` | 422 | This module type has no exercises |\n| `module_id_duplicate` | 422 | Two modules in the request share an ID |\n| `module_not_found` | 422 | No module with that ID in this workout or request |\n| `module_type_mismatch` | 422 | The settings are for another module type; types can’t change |\n| `module_type_unsupported` | 422 | The API can’t edit modules of this type |\n| `operation_conflict` | 422 | Two edits in the batch conflict (the same module removed and changed, say) |\n| `publish_duration_invalid` | 422 | A published workout’s main track must play 5 to 60 minutes (`details.seconds` is how long it plays, null when it can’t be timed) |\n| `publish_expiry_invalid` | 422 | `expiresAt` must be a date and time in the future, within about 5 years |\n| `schedule_copy_invalid` | 422 | Each destination must be a different week, a whole number of weeks away |\n| `schedule_nothing_to_copy` | 422 | Every copied class would be in the past or about to start |\n| `schedule_operation_invalid` | 422 | An update has nothing to change |\n| `schedule_range_invalid` | 422 | The dates are out of order, or further ahead or wider than allowed |\n| `schedule_time_invalid` | 422 | Classes start on five-minute marks, such as 10:00 or 10:05 |\n| `schedule_too_large` | 422 | The request covers too many classes; split it by date |\n| `schedule_week_empty` | 422 | The week to copy has no classes |\n| `schedule_workout_unavailable` | 422 | A workout was deleted, or this location can’t use it |\n| `setting_not_representable` | 422 | The module has a setting the API can’t show or change; change it in the app |\n| `setting_unsupported` | 422 | A setting this module type doesn’t take |\n| `settings_invalid` | 422 | The module’s settings with this change aren’t valid; `details.issues` says why |\n| `time_zone_invalid` | 422 | Not an IANA time zone |\n| `time_zone_required` | 422 | The request has no `timeZone` and the location’s displays don’t report one; send an IANA time zone |\n| `timing_invalid` | 422 | A timing value isn’t a whole number of seconds in range |\n| `timing_override_unsupported` | 422 | Per-exercise `timingsSeconds` work only in flow modules |\n| `too_many_media` | 422 | The request names more different media files than one request can use |\n| `track_invalid` | 422 | A track must be 1 to 5 |\n| `whiteboard_canvas_text` | 422 | The whiteboard uses the app’s canvas editor; change its text in the app |\n| `workout_locked` | 422 | The workout has a module of a type the API can’t time or edit, so only its details can change |\n| `workout_too_complex` | 422 | The workout is too complex to time; simplify its repeats or timings |\n| `workout_too_large` | 422 | Too many modules, exercises or timings |\n| `workout_too_long` | 422 | A track would play for more than 24 hours |\n| `precondition_required` | 428 | Send `If-Match` with the revision you read (see Revisions) |\n| `schedule_revision_required` | 428 | This batch can remove or change classes; preview it and send the preview’s `revision` |\n| `rate_limited` | 429 | Too many requests; retry after `Retry-After` seconds |\n| `internal` | 500 | Something went wrong on our side |\n| `image_copy_failed` | 503 | Copying the workout’s whiteboard images didn’t finish; retry with the same `Idempotency-Key` |\n| `service_unavailable` | 503 | CloudFit is briefly unavailable; retry shortly |\n| `writes_paused` | 503 | CloudFit has paused changes through the API, everywhere or for this location (`details.scope`: `all` or `location`); reads still work |\n\n## Warnings\n\nSuccessful responses can carry `warnings`, each with a `code` and a `message`. Nothing was refused.\n\n| Code | Meaning |\n| --- | --- |\n| `demo_link_dropped` | A demos module linked a module that was left out, so that link was removed |\n| `demos_without_linked_modules` | The demos module links no modules |\n| `display_on_empty_track` | Displays (`displays`) are set to a track (`track`) with no modules, so they show nothing during this workout. Add modules to that track, or set the displays to another track |\n| `display_without_exercises` | In manual display mode a display has no exercises |\n| `exercise_display_ignored` | Exercises name displays (`overrides.display`, listed in `displays`) the module won’t use: displays are used only in manual display mode, and only once every exercise names one |\n| `exercise_overrides_unsupported` | Some of an exercise’s settings (label, display, timings, …) can’t be shown; send the exercise back with its `assignmentId` to keep them |\n| `exercise_reference_invalid` | One of these exercises can’t be read, so the module’s exercises can’t be edited here; change them in the app |\n| `exercise_unavailable` | An exercise is no longer available here (deleted, or from a library this location can’t use) |\n| `exercises_on_missing_display` | In manual display mode, exercises are on displays (`displays`) that aren’t paired, or are off or on another track for this module, so they show nowhere. Use the location’s display numbers |\n| `fewer_exercises_than_displays` | Fewer exercises than displays showing this module (`displays`), so some displays have none |\n| `manual_display_with_snake_ordering` | Snake ordering can’t be used with manual display mode; the displays ignore it |\n| `module_omitted` | A module of a type the API doesn’t support was left out of the copy |\n| `module_too_long` | The module plays for more than 24 hours |\n| `module_type_unsupported` | A module of a type the API doesn’t cover; it has no timing |\n| `module_without_track` | A module plays on no track; fix it in the app |\n| `more_zones_than_exercises` | The module has more zones than exercises |\n| `no_exercises_added` | The module has no exercises |\n| `no_workout_selected` | These classes have no workout yet and won’t start until one is chosen |\n| `publish_display_exercises_hidden` | These modules put exercises on display 2 or later by hand; those exercises don’t show in the published workout |\n| `publish_empty_modules` | These modules have no exercises, so they show only a timer |\n| `publish_extra_tracks` | Only track 1 plays in the published workout; modules on other tracks are left out |\n| `publish_grid_exercises_hidden` | These modules have more than 8 exercises; the published workout’s grid shows only 8 |\n| `publish_grid_layout` | These modules show exercises in a grid, which doesn’t suit one screen; a flow module shows them one at a time |\n| `schedule_timezone_differs` | Most classes nearby use a different time zone; check the time zone is the location’s |\n| `snake_ordering_with_mixed_orientations` | Snake ordering can’t run across portrait and landscape displays (`displays`) in automatic display mode; the app refuses it |\n| `times_skipped` | These dates and times have passed or are about to start, so they were left alone |\n| `timing_not_computed` | Timing wasn’t computed (`reason` says why); the rest of the read is complete |\n| `too_many_exercises_per_android_display` | A Google TV, Chromecast or other Android display shows this module, and a display (`displays`) would have more than 8 exercises (`limit`): the app won’t start the workout like this. Keep each display to 8, or split the module |\n| `too_many_exercises_per_display` | More than 12 exercises (`limit`) would be on one display (`displays`): tiles get too small to follow, and mirror mode shows only the first 12. Use fewer exercises, more displays (manual display mode), or split the module |\n| `track_without_display` | No display plays this track (`track`, where 1 is the main track), so its modules show nowhere. Set displays to it with the workout’s `displays` (an `updateDisplays` edit for a saved workout), using the location’s display numbers |\n| `uneven_zones` | Each zone should have the same number of exercises |\n| `video_ends_module` | The background video is shorter than the module, so the module ends when the video does |\n\n## Per-item results\n\nExercise renames and updates report each item’s `code` (or `reason`), in results or in a refusal’s `details.problems`.\n\n| Code | Meaning |\n| --- | --- |\n| `chatgpt_file_host` | The download link isn’t one of ChatGPT’s file links; only files attached in ChatGPT can be added this way |\n| `chatgpt_file_invalid` | The file isn’t one ChatGPT attached (its `file_id` is missing or malformed) |\n| `chatgpt_file_name_missing` | ChatGPT didn’t send the file’s name; give its exercise a name in `exercises` |\n| `exercise_details_builtin` | It replaces a built-in exercise’s video, so it keeps that exercise’s equipment and categories |\n| `exercise_details_missing` | An update needs equipment, categories or both |\n| `exercise_media_not_in_library` | The exercise’s media belongs to another library, so it can’t be renamed here |\n| `exercise_name_duplicate` | Two renames in the request give the same name |\n| `exercise_name_invalid` | Exercise names are 3 to 100 letters, numbers, spaces and simple punctuation |\n| `exercise_name_taken` | The library already has an exercise with that name |\n| `exercise_name_unchanged` | The new name gives the same exercise ID |\n| `exercise_needs_media` | The exercise has no video or image yet; add one before renaming it |\n| `exercise_not_found` | No exercise with that ID in this location’s library |\n| `exercise_processing` | Its media is still uploading or processing; try again once it’s ready |\n| `exercise_rename_failed` | The rename didn’t finish; try it again |\n| `exercise_replaces_builtin` | That is a built-in exercise’s name; send replaceBuiltIn: true to replace the built-in video in this location |\n| `exercise_update_duplicate` | The request changes the same exercise more than once |\n| `media_not_in_library` | The exercise’s media belongs to another library |\n| `media_unavailable` | The exercise’s media can’t be found |\n\n## Upload failures\n\nThe `code` of an upload whose status is `failed`.\n\n| Code | Meaning |\n| --- | --- |\n| `chatgpt_file_fetch_failed` | CloudFit couldn’t fetch the file from ChatGPT; send it again |\n| `chatgpt_file_unavailable` | ChatGPT’s download link had expired or was refused; send the file again for a fresh one |\n| `exercise_media_failed` | Processing the video didn’t work; upload it again with a new link |\n| `exercise_upload_failed` | Processing didn’t work; upload it again with a new link |\n| `exercise_upload_invalid` | The file was over the size limit or not the right type, so it was deleted |\n| `exercise_upload_limited` | Too many videos were processed recently; try again later |\n| `exercise_upload_refused` | The account can no longer manage this library, or the exercise is gone |\n| `exercise_upload_rejected` | CloudFit couldn’t use the file (the message says why, such as a portrait or too-long video) |\n| `media_save_failed` | The file arrived but couldn’t be saved to the library; upload it again |\n| `media_upload_limited` | Too many videos were processed recently; try again later |\n| `media_upload_refused` | The account can no longer add to this media library |\n| `media_video_failed` | Processing didn’t work; upload it again with a new link |\n| `media_video_invalid` | The file was over the size limit or not a video, so it was deleted |\n| `media_video_rejected` | CloudFit couldn’t use the video (the message says why, such as one too long or of an unknown type) |"},"servers":[{"url":"https://api.cloudfit.tv"}],"security":[{"bearer":[]}],"tags":[{"name":"Account","description":"The token and its locations"},{"name":"Exercises","description":"Exercise search, and the location’s custom exercises: create, upload, import, rename, update and delete"},{"name":"Media","description":"Images and videos in media libraries"},{"name":"Folders","description":"Where workouts are filed"},{"name":"Schedule","description":"Classes on a location’s calendar"},{"name":"History","description":"What ran at a location"},{"name":"Workouts","description":"Workouts: read, create, edit, duplicate, publish and delete"}],"paths":{"/v1/me":{"get":{"operationId":"getMe","summary":"Get account","description":"You, the token’s name and expiry, and every location it covers with what it can do there.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"The account","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"token":{"type":"object","properties":{"name":{"type":"string"},"expiresAt":{"type":"string"}},"required":["name","expiresAt"],"additionalProperties":false},"locations":{"type":"array","items":{"type":"object","properties":{"locationId":{"description":"The location’s ID, for every request about it","type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"role":{"description":"How you reach the location: its owner, the owner of its HQ, or staff it is shared with","type":"string","enum":["owner","hqOwner","staff"]},"scopes":{"description":"What this access may do there","type":"array","items":{"type":"string","enum":["locations:read","exercises:read","media:read","workouts:read","schedule:read","workouts:write","media:write","schedule:write","exercises:write"]}},"capabilities":{"description":"What this access can do with workouts there, from its scopes and your permissions together. The change scopes (`schedule:write`, `exercises:write`, `media:write`) already reflect your permissions","type":"object","properties":{"createWorkouts":{"type":"boolean"},"editWorkouts":{"description":"Which workouts you can edit and delete: every one, only the ones you created, or none","type":"string","enum":["all","mine","none"]},"publishWorkouts":{"description":"Publish workouts on a public web page and take them down (owners only)","type":"boolean"},"createFolders":{"type":"boolean"}},"required":["createWorkouts","editWorkouts","publishWorkouts","createFolders"],"additionalProperties":false}},"required":["locationId","name","role","scopes","capabilities"],"additionalProperties":false}}},"required":["userId","token","locations"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations":{"get":{"operationId":"listLocations","summary":"List locations","description":"The locations (gyms, studios, HQs) this token can read: those where it holds `locations:read`.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"The locations","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"object","properties":{"locationId":{"description":"The location’s ID, for every request about it","type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"role":{"description":"How you reach the location: its owner, the owner of its HQ, or staff it is shared with","type":"string","enum":["owner","hqOwner","staff"]},"scopes":{"description":"What this access may do there","type":"array","items":{"type":"string","enum":["locations:read","exercises:read","media:read","workouts:read","schedule:read","workouts:write","media:write","schedule:write","exercises:write"]}},"capabilities":{"description":"What this access can do with workouts there, from its scopes and your permissions together. The change scopes (`schedule:write`, `exercises:write`, `media:write`) already reflect your permissions","type":"object","properties":{"createWorkouts":{"type":"boolean"},"editWorkouts":{"description":"Which workouts you can edit and delete: every one, only the ones you created, or none","type":"string","enum":["all","mine","none"]},"publishWorkouts":{"description":"Publish workouts on a public web page and take them down (owners only)","type":"boolean"},"createFolders":{"type":"boolean"}},"required":["createWorkouts","editWorkouts","publishWorkouts","createFolders"],"additionalProperties":false}},"required":["locationId","name","role","scopes","capabilities"],"additionalProperties":false}}},"required":["locations"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/exercises":{"get":{"operationId":"searchExercises","summary":"Search exercises","description":"Lexical, alias-aware name matching over every built-in exercise (`builtIn`), this location’s own exercises (`own`) and, when it uses them, its HQ’s (`hq`). Use the returned `reference` in workout specs. `equipment` ranks matches; it never filters.","tags":["Exercises"],"x-cloudfit-scope":"exercises:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","required":true,"description":"The exercise to find (\"goblet squat\"), or several separated by commas (\"burpee, mountain climber\"), 1 to 200 characters","schema":{"type":"string"},"in":"query"},{"name":"equipment","description":"Comma-separated equipment to rank first","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 50, default 20","schema":{"type":"integer","minimum":1,"maximum":50},"in":"query"}],"responses":{"200":{"description":"Best matches first","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exercises":{"description":"The location’s own and its HQ’s matches first, then built-in: up to 5 for one name, 3 for each name in a list. Each best first","type":"array","items":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/ExerciseReference"},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"description":"e.g. strength, cardio","type":"array","items":{"type":"string"}}},"required":["reference","name","equipment","categories"],"additionalProperties":false}},"moreMatches":{"description":"More built-in exercises matched than are shown; search more specifically for others","type":"boolean"},"hint":{"description":"With `moreMatches`: how to search more specifically, to show to the user or follow","type":"string"},"unmatched":{"description":"Names searched for that matched nothing; try another spelling or a simpler name","type":"array","items":{"type":"string"}}},"required":["exercises","moreMatches"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises":{"get":{"operationId":"listCustomExercises","summary":"List custom exercises","description":"The location’s own exercises: custom ones, and built-in ones whose video it replaced. Sorted by ID, up to 200 a page.","tags":["Exercises"],"x-cloudfit-scope":"exercises:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","description":"From the previous page’s `nextCursor`","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 200, default 200","schema":{"type":"integer","minimum":1,"maximum":200},"in":"query"}],"responses":{"200":{"description":"A page of exercises","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exercises":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"media":{"type":"string","enum":["video","image","none"]},"needsMedia":{"description":"Created without media yet; workouts can’t use it until some is added","type":"boolean"},"processing":{"description":"Media still uploading or processing: can’t be renamed or downloaded until it’s done","type":"boolean"},"replacesBuiltIn":{"description":"Replaces a built-in exercise’s video in this location","type":"boolean"}},"required":["reference","name","equipment","categories","media","needsMedia","processing","replacesBuiltIn"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string"}},"required":["exercises","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createExercise","summary":"Create an exercise","description":"Adds a custom exercise without media yet; workouts can use it once a video or image is added. Equipment and categories are chosen from the values the schema lists. A built-in exercise’s name needs `replaceBuiltIn`. Repeating a request the API carried out returns the same exercise with `created: false`; if the first result can’t be confirmed, the repeat gets `exercise_name_taken`; list the custom exercises to check. 50 a day per location.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"3 to 100 letters, numbers, spaces and - , . ' ; ! ? ( ) & + /","type":"string","minLength":1,"maxLength":100},"equipment":{"description":"Up to 10; \"no equipment\" if left out","maxItems":10,"type":"array","items":{"type":"string","enum":["ab wheel","abmat","airdyne","band","barbell","battle ropes","bench","bike","bosu","box","boxing pads","cable","chin up bar","cone","dead ball","dowel","dumbbell","fit ball","fitbench","foam roller","hammer","kettlebell","ladder","landmine","mat","medicine ball","mini band","no equipment","penalty box","pilates ball","pilates band","pilates ring","pump bar","punching bag","reformer","resistance band","resistance bar","rip60","rower","sand disc","sandbag","skierg","skipping rope","sled","slider","step","studio plate","suspension trainer","t-bar","treadmill","tyre","wall","wall ball","weight plate","ybell"]}},"categories":{"description":"Up to 10, such as strength or cardio","maxItems":10,"type":"array","items":{"type":"string","enum":["boxing","cardio","core","mobility","partnered","pilates","plyometrics","resistance","rest","strength","stretch"]}},"replaceBuiltIn":{"description":"Needed when the name is a built-in exercise’s: this location’s media then replaces it","type":"boolean"}},"required":["name"],"additionalProperties":false},"examples":{"create":{"value":{"name":"Heavy Sled Push","equipment":["sled"],"categories":["strength"]}}}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"description":"False when this request was already carried out","type":"boolean"},"exercise":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"media":{"type":"string","enum":["video","image","none"]},"needsMedia":{"description":"Created without media yet; workouts can’t use it until some is added","type":"boolean"},"processing":{"description":"Media still uploading or processing: can’t be renamed or downloaded until it’s done","type":"boolean"},"replacesBuiltIn":{"description":"Replaces a built-in exercise’s video in this location","type":"boolean"}},"required":["reference","name","equipment","categories","media","needsMedia","processing","replacesBuiltIn"],"additionalProperties":false}},"required":["created","exercise"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/renames":{"post":{"operationId":"renameExercises","summary":"Rename exercises","description":"Renames up to 10 exercises, updating every workout that uses them. An exercise’s ID comes from its name, so a renamed exercise has a new ID (`results[].newId`). Every rename is checked first and any problem changes nothing (`exercise_rename_invalid`); then each runs on its own and `results` reports each one. Repeating a request is safe, so no `Idempotency-Key` is needed: a rename already made reports `already_renamed`. 50 renames a day per location.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"renames":{"description":"Up to 10 renames, each an exercise’s ID and its new name","minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"from":{"description":"The exercise’s ID, from the library list","type":"string","minLength":1,"maxLength":200},"to":{"description":"The new name","type":"string","minLength":1,"maxLength":100},"replaceBuiltIn":{"description":"Needed when the new name is a built-in exercise’s: this video then replaces it","type":"boolean"}},"required":["from","to"],"additionalProperties":false}}},"required":["renames"],"additionalProperties":false},"examples":{"rename":{"value":{"renames":[{"from":"sled_push_heavy","to":"Heavy Sled Push"},{"from":"kb_swing","to":"Kettlebell Swing","replaceBuiltIn":true}]}}}}}},"responses":{"200":{"description":"What happened to each","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"from":{"description":"The exercise’s ID before the rename","type":"string"},"newId":{"description":"Its ID after the rename, from the new name","type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["renamed","already_renamed","failed"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["from","newId","status"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/updates":{"post":{"operationId":"updateExercises","summary":"Update exercises","description":"Changes the equipment and categories of up to 10 exercises, all together: any problem changes nothing (`exercise_update_invalid`, with `details.problems`); the schema lists the equipment and category values. Send either field or both; each replaces what the exercise has, and an empty `equipment` means no equipment. Exercises with no media yet can be updated; ones processing, or replacing a built-in exercise’s video, can’t. Repeating a request is safe: an exercise already as asked reports `unchanged`. 200 a day per location.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"description":"Up to 10 changes, each an exercise’s ID and the fields to replace","minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"description":"The exercise’s ID, from the library list","type":"string","minLength":1,"maxLength":200},"equipment":{"description":"Replaces its equipment; an empty list means \"no equipment\"","maxItems":10,"type":"array","items":{"type":"string","enum":["ab wheel","abmat","airdyne","band","barbell","battle ropes","bench","bike","bosu","box","boxing pads","cable","chin up bar","cone","dead ball","dowel","dumbbell","fit ball","fitbench","foam roller","hammer","kettlebell","ladder","landmine","mat","medicine ball","mini band","no equipment","penalty box","pilates ball","pilates band","pilates ring","pump bar","punching bag","reformer","resistance band","resistance bar","rip60","rower","sand disc","sandbag","skierg","skipping rope","sled","slider","step","studio plate","suspension trainer","t-bar","treadmill","tyre","wall","wall ball","weight plate","ybell"]}},"categories":{"description":"Replaces its categories, such as strength or cardio","maxItems":10,"type":"array","items":{"type":"string","enum":["boxing","cardio","core","mobility","partnered","pilates","plyometrics","resistance","rest","strength","stretch"]}}},"required":["id"],"additionalProperties":false}}},"required":["updates"],"additionalProperties":false},"examples":{"update":{"value":{"updates":[{"id":"heavy_sled_push","equipment":["sled"],"categories":["strength","cardio"]},{"id":"plank_hold","equipment":[]}]}}}}}},"responses":{"200":{"description":"Each exercise as it now is","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"description":"unchanged: it already had this equipment and these categories","type":"string","enum":["updated","unchanged"]},"exercise":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"media":{"type":"string","enum":["video","image","none"]},"needsMedia":{"description":"Created without media yet; workouts can’t use it until some is added","type":"boolean"},"processing":{"description":"Media still uploading or processing: can’t be renamed or downloaded until it’s done","type":"boolean"},"replacesBuiltIn":{"description":"Replaces a built-in exercise’s video in this location","type":"boolean"}},"required":["reference","name","equipment","categories","media","needsMedia","processing","replacesBuiltIn"],"additionalProperties":false}},"required":["id","status","exercise"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/download-links":{"post":{"operationId":"getExerciseDownloadLinks","summary":"Download exercise media","description":"Links to the media of up to 25 exercises: the file the TVs play, and the original upload, when CloudFit kept it. Links work for 2 hours. 200 exercises a day per location.","tags":["Exercises"],"x-cloudfit-scope":"exercises:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exerciseIds":{"description":"Up to 25 of the location’s custom exercise IDs","minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["exerciseIds"],"additionalProperties":false},"examples":{"download":{"value":{"exerciseIds":["heavy_sled_push","kettlebell_swing"]}}}}}},"responses":{"200":{"description":"Links, or why not","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"downloads":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"media":{"type":"string","enum":["video","image"]},"playback":{"description":"The processed file the TVs play","type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"}},"required":["url","filename"],"additionalProperties":false},"original":{"description":"The file as uploaded, when CloudFit kept it","type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"}},"required":["url","filename"],"additionalProperties":false},"expiresAt":{"type":"string"},"unavailable":{"type":"string","enum":["exercise_not_found","exercise_processing","media_unavailable","media_not_in_library"]}},"required":["reference"],"additionalProperties":false}}},"required":["downloads"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/{exerciseId}/uploads":{"post":{"operationId":"createExerciseMediaUpload","summary":"Upload exercise media","description":"An upload link for the video or image of an exercise with no media yet, such as one just created. `filename` gives the type. PUT the file’s bytes in one request to `putUrl` (with `contentType`, or no Content-Type), or give `uploadUrl` to a person to open and choose the file. A video must be landscape, up to 268 MB and no longer than `maxSeconds` (the location’s limit); an image up to 25 MB. The link works for 30 minutes. Processing starts on its own once the file is in; check the upload for its status.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"exerciseId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"description":"The file to upload, for its type: a video (.mp4, .mov, .m4v, .webm) or an image (.jpg, .jpeg, .png, .webp, .heic, .avif)","type":"string","minLength":1,"maxLength":200}},"required":["filename"],"additionalProperties":false},"examples":{"video":{"value":{"filename":"sled-push.mp4"}}}}}},"responses":{"201":{"description":"The link","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"media":{"type":"string","enum":["video","image"]},"uploadUrl":{"description":"A page for a person to choose the file","type":"string"},"putUrl":{"description":"PUT the file’s bytes here in one request; processing starts once it’s in","type":"string"},"contentType":{"description":"Send this Content-Type with the PUT, or none","type":"string"},"maxBytes":{"type":"integer"},"maxSeconds":{"description":"Videos only: the longest video this location accepts; a longer one is rejected","type":"number"},"expiresAt":{"type":"string"}},"required":["uploadId","media","uploadUrl","putUrl","contentType","maxBytes","expiresAt"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/exercise-imports":{"post":{"operationId":"createExerciseImport","summary":"Start an exercise import","description":"Starts a bulk import: one page link (`uploadUrl`, open 24 hours) where a person can choose or drop many files at once, each becoming an exercise named after the file. Clients that have the files can add them with `POST …/files` instead. 200 exercises per location in any 7 days unless CloudFit raises it, separate from the everyday creation limit; files never uploaded stop counting once the import closes. One import open at a time: asking again while one is open returns it with a fresh link (`resumed: true`). Each file starts processing on its own when it arrives; videos are paced within the location’s processing budget.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replaceBuiltIn":{"description":"Let files named like built-in exercises replace their videos with this location’s own","type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"The import","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"importId":{"type":"string"},"uploadUrl":{"description":"A page for a person to choose or drop many files at once, open for 24 hours","type":"string"},"expiresAt":{"type":"string"},"resumed":{"description":"True when this is the import already open, with a fresh link; the old link stops working","type":"boolean"},"replaceBuiltIn":{"description":"Whether files may replace built-in exercises’ videos","type":"boolean"},"allowance":{"description":"The import allowance: 200 exercises per 7 days, or more while CloudFit boosts it","type":"object","properties":{"limit":{"description":"Exercises this location can import in any 7 days","type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"boosted":{"description":"CloudFit raised the allowance for a larger library","type":"boolean"},"nextFreesAt":{"description":"When the oldest counted imports stop counting","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["limit","used","remaining","boosted","nextFreesAt"],"additionalProperties":false}},"required":["importId","uploadUrl","expiresAt","resumed","replaceBuiltIn","allowance"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/exercise-imports/{importId}/files":{"post":{"operationId":"addExerciseImportFiles","summary":"Add files to an import","description":"Adds up to 50 files: each is checked as a created exercise would be and gets a `putUrl` to PUT its bytes to. `problems` lists files not added. The exercise is created and processing starts on its own once its file arrives. If a response is lost, send the same files again: ones already added and still waiting come back with their `putUrl` (`alreadyAdded`) and use none of the allowance, so only the rest need fixing.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"importId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"description":"Up to 50 files to add to the import; each becomes an exercise once uploaded","minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"filename":{"description":"The file’s name, with its type: mp4, mov, m4v, webm, jpg, jpeg, png, webp, heic or avif","type":"string","minLength":1,"maxLength":300},"name":{"description":"The exercise’s name; from the file’s name when left out","type":"string","minLength":1,"maxLength":100},"equipment":{"description":"Up to 10; \"no equipment\" if left out","maxItems":10,"type":"array","items":{"type":"string","enum":["ab wheel","abmat","airdyne","band","barbell","battle ropes","bench","bike","bosu","box","boxing pads","cable","chin up bar","cone","dead ball","dowel","dumbbell","fit ball","fitbench","foam roller","hammer","kettlebell","ladder","landmine","mat","medicine ball","mini band","no equipment","penalty box","pilates ball","pilates band","pilates ring","pump bar","punching bag","reformer","resistance band","resistance bar","rip60","rower","sand disc","sandbag","skierg","skipping rope","sled","slider","step","studio plate","suspension trainer","t-bar","treadmill","tyre","wall","wall ball","weight plate","ybell"]}},"categories":{"description":"Up to 10, such as strength or cardio","maxItems":10,"type":"array","items":{"type":"string","enum":["boxing","cardio","core","mobility","partnered","pilates","plyometrics","resistance","rest","strength","stretch"]}}},"required":["filename"],"additionalProperties":false}},"replaceBuiltIn":{"description":"For these files, whether a built-in exercise’s name replaces it with the file (true) or is refused (false); the import’s setting when left out","type":"boolean"}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Files added","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"fileId":{"type":"string"},"name":{"type":"string"},"exerciseId":{"type":"string"},"media":{"type":"string","enum":["video","image"]},"putUrl":{"description":"PUT the file’s bytes here in one request; processing starts once it’s in","type":"string"},"contentType":{"description":"Send this Content-Type with the PUT, or none","type":"string"},"maxBytes":{"type":"integer"},"maxSeconds":{"type":"number"},"alreadyAdded":{"description":"An earlier call added this file and it hasn’t been uploaded yet: here is its `putUrl` again","type":"boolean","const":true}},"required":["filename","fileId","name","exerciseId","media","putUrl","contentType","maxBytes"],"additionalProperties":false}},"problems":{"description":"Files not added, and why; the rest were","type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["filename","code","message"],"additionalProperties":false}},"allowance":{"description":"The import allowance: 200 exercises per 7 days, or more while CloudFit boosts it","type":"object","properties":{"limit":{"description":"Exercises this location can import in any 7 days","type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"boosted":{"description":"CloudFit raised the allowance for a larger library","type":"boolean"},"nextFreesAt":{"description":"When the oldest counted imports stop counting","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["limit","used","remaining","boosted","nextFreesAt"],"additionalProperties":false}},"required":["files","problems","allowance"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/exercise-imports/{importId}":{"get":{"operationId":"getExerciseImport","summary":"Check an import","description":"Totals and a page of files with each one’s state: `waiting_for_file` (not uploaded yet), `expired` (the import closed first), `queued` (uploaded, waiting its turn within the processing budget), `processing`, `ready` (with the exercise) or `failed` (`code` and `message` say why). Files start processing on their own when they arrive; this only reports.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"importId","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","description":"From the previous page’s `nextCursor`","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 100, default 100","schema":{"type":"integer","minimum":1,"maximum":100},"in":"query"}],"responses":{"200":{"description":"The import","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"importId":{"type":"string"},"open":{"description":"Still taking files","type":"boolean"},"expiresAt":{"type":"string"},"totals":{"type":"object","properties":{"files":{"type":"integer"},"waitingForFile":{"type":"integer"},"queued":{"description":"Uploaded and waiting their turn to process","type":"integer"},"processed":{"description":"Handed to processing; each file says when it’s ready","type":"integer"},"failed":{"type":"integer"}},"required":["files","waitingForFile","queued","processed","failed"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"filename":{"type":"string"},"name":{"type":"string"},"exerciseId":{"type":"string"},"status":{"type":"string","enum":["waiting_for_file","expired","queued","processing","ready","failed"]},"code":{"type":"string"},"message":{"type":"string"},"exercise":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"media":{"type":"string","enum":["video","image","none"]},"needsMedia":{"description":"Created without media yet; workouts can’t use it until some is added","type":"boolean"},"processing":{"description":"Media still uploading or processing: can’t be renamed or downloaded until it’s done","type":"boolean"},"replacesBuiltIn":{"description":"Replaces a built-in exercise’s video in this location","type":"boolean"}},"required":["reference","name","equipment","categories","media","needsMedia","processing","replacesBuiltIn"],"additionalProperties":false}},"required":["fileId","filename","name","exerciseId","status"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowance":{"description":"The import allowance: 200 exercises per 7 days, or more while CloudFit boosts it","type":"object","properties":{"limit":{"description":"Exercises this location can import in any 7 days","type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"boosted":{"description":"CloudFit raised the allowance for a larger library","type":"boolean"},"nextFreesAt":{"description":"When the oldest counted imports stop counting","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["limit","used","remaining","boosted","nextFreesAt"],"additionalProperties":false}},"required":["importId","open","expiresAt","totals","files","nextCursor","allowance"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/{exerciseId}/uploads/{uploadId}":{"get":{"operationId":"getExerciseMediaUpload","summary":"Check exercise media","description":"Where the upload stands: `waiting_for_file`, `expired`, `processing`, `ready` (with the exercise) or `failed` (`code` and `message` say why). `processing` means the file is in and processing started on its own. A video takes a few minutes. Read only: processing doesn’t wait for this call.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"exerciseId","in":"path","required":true,"schema":{"type":"string"}},{"name":"uploadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The upload","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"status":{"description":"`waiting_for_file`: the file hasn’t arrived; `expired`: the link closed first; `processing`: the file is in and processing started on its own; `ready`: done; `failed`: see `code` and `message`","type":"string","enum":["waiting_for_file","expired","processing","ready","failed"]},"expiresAt":{"type":"string"},"exercise":{"type":"object","properties":{"reference":{"type":"object","properties":{"source":{"type":"string","const":"own"},"id":{"type":"string"}},"required":["source","id"],"additionalProperties":false},"name":{"type":"string"},"equipment":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"media":{"type":"string","enum":["video","image","none"]},"needsMedia":{"description":"Created without media yet; workouts can’t use it until some is added","type":"boolean"},"processing":{"description":"Media still uploading or processing: can’t be renamed or downloaded until it’s done","type":"boolean"},"replacesBuiltIn":{"description":"Replaces a built-in exercise’s video in this location","type":"boolean"}},"required":["reference","name","equipment","categories","media","needsMedia","processing","replacesBuiltIn"],"additionalProperties":false},"code":{"type":"string"},"message":{"type":"string"}},"required":["uploadId","status"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/media":{"get":{"operationId":"listMedia","summary":"List media","description":"Images or videos in a media library, newest first. Use a result’s `mediaId` as a whiteboard’s `background.mediaId`.","tags":["Media"],"x-cloudfit-scope":"media:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"source","description":"`own` (default), `hq` or `builtIn`","schema":{"type":"string","enum":["own","hq","builtIn"]},"in":"query"},{"name":"type","description":"`image` (default) or `video`","schema":{"type":"string","enum":["image","video"]},"in":"query"},{"name":"q","description":"Search by name or keyword, 1 to 100 characters","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 50, default 20","schema":{"type":"integer","minimum":1,"maximum":50},"in":"query"},{"name":"cursor","description":"From `nextCursor`","schema":{"type":"string"},"in":"query"}],"responses":{"200":{"description":"One page of media","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"array","items":{"type":"object","properties":{"mediaId":{"description":"Use as a whiteboard’s `background.mediaId`","type":"string"},"source":{"description":"This location’s own, its HQ’s, or CloudFit’s built-in","type":"string","enum":["own","hq","builtIn"]},"type":{"type":"string","enum":["image","video"]},"name":{"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"seconds":{"description":"A video’s length","anyOf":[{"type":"number"},{"type":"null"}]},"thumbnailUrl":{"type":"string"},"processing":{"description":"A video still being processed can’t be used yet","type":"boolean"},"keywords":{"type":"array","items":{"type":"string"}}},"required":["mediaId","source","type","name","width","height","seconds","thumbnailUrl","processing","keywords"],"additionalProperties":false}},"nextCursor":{"description":"Pass as `cursor` for the next page","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["media","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/media/uploads":{"post":{"operationId":"createMediaUpload","summary":"Upload media","description":"An upload link for one image or video for this location’s media library, such as a whiteboard background. `filename` gives the type (an image: JPG, PNG or WebP, up to 20 MB; a video: MP4, MOV or M4V, up to 268 MB and no longer than `maxSeconds`) and, unless `name` is given, the name the library shows. PUT the file’s bytes in one request to `putUrl` (with `contentType`, or no Content-Type), or give `uploadUrl` to a person to open and choose the file. The link works for 30 minutes. The file is saved to the library on its own once it’s in; check the upload for its `mediaId`.","tags":["Media"],"x-cloudfit-scope":"media:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"description":"The file to upload, for its type: an image (.jpg, .jpeg, .png, .webp) or a video (.mp4, .mov, .m4v)","type":"string","minLength":1,"maxLength":200},"name":{"description":"A name to show in the library; the filename without its type when left out","type":"string","minLength":1,"maxLength":100}},"required":["filename"],"additionalProperties":false},"examples":{"loop":{"value":{"filename":"rain-loop.mp4","name":"Rain loop"}}}}}},"responses":{"201":{"description":"The link","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"type":{"type":"string","enum":["image","video"]},"uploadUrl":{"description":"A page for a person to open and choose the file. Single use","type":"string"},"putUrl":{"description":"Send the file’s bytes here in one PUT request; it’s saved to the library on its own once it’s in","type":"string"},"contentType":{"description":"Send this Content-Type with the bytes, or none","type":"string"},"maxBytes":{"type":"integer"},"maxSeconds":{"description":"Videos: the longest this location accepts; null for an image","anyOf":[{"type":"number"},{"type":"null"}]},"expiresAt":{"description":"When the link stops taking a file","type":"string"}},"required":["uploadId","type","uploadUrl","putUrl","contentType","maxBytes","maxSeconds","expiresAt"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/media/uploads/{uploadId}":{"get":{"operationId":"getMediaUpload","summary":"Check a media upload","description":"Where the upload stands: `waiting_for_file`, `expired`, `processing`, `ready` (with the library file, whose `mediaId` works as a whiteboard’s `background.mediaId`) or `failed` (`code` and `message` say why). An image is ready as soon as it arrives; a video usually within a few minutes. An image upload’s ID also works as a whiteboard’s `canvasImage.uploadId`.","tags":["Media"],"x-cloudfit-scope":"media:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"uploadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The upload","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"type":{"type":"string","enum":["image","video"]},"status":{"description":"`waiting_for_file`: the file hasn’t arrived; `expired`: the link closed first; `processing`: the file is in and being saved; `ready`: in the library (`media`); `failed`: see `code` and `message`","type":"string","enum":["waiting_for_file","expired","processing","ready","failed"]},"expiresAt":{"type":"string"},"media":{"description":"Once ready: the library file, whose `mediaId` works as a whiteboard’s background","type":"object","properties":{"mediaId":{"description":"Use as a whiteboard’s `background.mediaId`","type":"string"},"source":{"description":"This location’s own, its HQ’s, or CloudFit’s built-in","type":"string","enum":["own","hq","builtIn"]},"type":{"type":"string","enum":["image","video"]},"name":{"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"seconds":{"description":"A video’s length","anyOf":[{"type":"number"},{"type":"null"}]},"thumbnailUrl":{"type":"string"},"processing":{"description":"A video still being processed can’t be used yet","type":"boolean"},"keywords":{"type":"array","items":{"type":"string"}}},"required":["mediaId","source","type","name","width","height","seconds","thumbnailUrl","processing","keywords"],"additionalProperties":false},"code":{"type":"string"},"message":{"type":"string"}},"required":["uploadId","type","status"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}":{"get":{"operationId":"getLocation","summary":"Get a location","description":"The location’s business details, paired displays (number, name, mode, orientation) and appearance (display font, brand colours, default sound). Use it to fit workouts to the displays: automatic display mode splits a module’s exercises across the enabled displays, and snake ordering can’t span a mix of portrait and landscape.","tags":["Account"],"x-cloudfit-scope":"locations:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The location","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"locationId":{"type":"string","minLength":1,"maxLength":200},"name":{"description":"The location’s name in CloudFit, as the app’s account screens show it; `business.name` is the name members see","type":"string"},"business":{"type":"object","properties":{"name":{"description":"\"Business Name\": what members see","anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"instagram":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","website","instagram"],"additionalProperties":false},"displays":{"description":"Paired displays in the app’s order","type":"array","items":{"type":"object","properties":{"number":{"description":"The app’s \"Display N\": what exercises’ `overrides.display` and manual display mode refer to","anyOf":[{"type":"integer"},{"type":"null"}]},"name":{"description":"What the app’s Connected Displays calls it: the name given in the app, or else the name the device reports for itself; null with neither","anyOf":[{"type":"string"},{"type":"null"}]},"named":{"description":"True when someone named the display in the app; false when `name` comes from the device","type":"boolean"},"mode":{"description":"`enabled` plays workouts; `disabled` shows standby and is skipped; `timer` shows a full-screen timer; `unknown` is a mode set in the app that the API doesn’t offer. A workout can override it per display","type":"string","enum":["enabled","disabled","timer","unknown"]},"orientation":{"type":"string","enum":["landscape","portraitLeft","portraitRight"]},"device":{"description":"The kind of device, e.g. \"Apple TV\", when known","anyOf":[{"type":"string"},{"type":"null"}]},"exerciseLimit":{"description":"Most exercises one module should put on this display: 8 on a Google TV, Chromecast or other Android display, 12 otherwise. Past it, validation warns; the app won’t start a workout over 8 on an Android display","type":"integer"}},"required":["number","name","named","mode","orientation","device","exerciseLimit"],"additionalProperties":false}},"displayLimit":{"description":"How many displays the location can pair","type":"integer"},"timeZone":{"description":"The IANA time zone the location’s displays report, which schedule requests use when they leave `timeZone` out; null when no display reports one","anyOf":[{"type":"string"},{"type":"null"}]},"appearance":{"type":"object","properties":{"font":{"description":"\"Display Font\"","type":"string","enum":["Asap","NotoSerif","Roboto","Ubuntu"]},"defaultSound":{"description":"\"Default Sound\": what new modules play; null for a sound this API doesn’t know","anyOf":[{"description":"`none` is silent. `beep1` (\"Beep 1 - Original\") to `beep5` (\"Sharp double\"), `boxingBell1`–`3`, `bell1`, `bell2`, `gong1`, `gong2`, `singingBowl1`, `singingBowl2` play at the start of each period; `countdownBeeps1`–`5` play over the last 3 seconds of each period instead","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},{"type":"null"}]},"colors":{"type":"object","properties":{"text":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"},"background":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"},"exerciseText":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"},"work":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"},"rest":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"},"drinkBreak":{"description":"`#RRGGBB`, or `#RRGGBBAA` for a colour that isn’t opaque","type":"string"}},"required":["text","background","exerciseText","work","rest","drinkBreak"],"additionalProperties":false}},"required":["font","defaultSound","colors"],"additionalProperties":false}},"required":["locationId","name","business","displays","displayLimit","timeZone","appearance"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/history":{"get":{"operationId":"listWorkoutHistory","summary":"List workout history","description":"What ran at the location, newest first, as the app’s Workout History shows it. Kept about 180 days.","tags":["History"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"events","description":"`starts` (default) lists each start; `all` adds the ends","schema":{"type":"string","enum":["starts","all"]},"in":"query"},{"name":"since","description":"At or after this ISO 8601 date and time, with Z or an offset","schema":{"type":"string"},"in":"query"},{"name":"before","description":"Before this ISO 8601 date and time, with Z or an offset","schema":{"type":"string"},"in":"query"},{"name":"cursor","description":"From the previous page’s `nextCursor`","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 100, default 50","schema":{"type":"integer","minimum":1,"maximum":100},"in":"query"}],"responses":{"200":{"description":"A page of history","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["start","end"]},"at":{"description":"When it started or ended (UTC); for a scheduled start, the scheduled time","type":"string"},"trigger":{"type":"string","enum":["manual","schedule"]},"workout":{"description":"The workout as it was named then: the location’s own, its HQ’s, or `other`","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"plannedSeconds":{"description":"The workout’s planned length then, not how long it ran","anyOf":[{"type":"integer"},{"type":"null"}]},"failed":{"description":"Starts: a scheduled class that couldn’t start","type":"boolean"},"completed":{"description":"Ends: true when it ran to its end, false when it was stopped","type":"boolean"},"warnings":{"description":"Setup warnings the app showed when it started","type":"array","items":{"type":"string"}}},"required":["id","event","at","trigger","workout","plannedSeconds","warnings"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["entries","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/folders":{"get":{"operationId":"listFolders","summary":"List folders","description":"The folders this location’s workouts can be filed under, as the app lists them. Each is `{ id, name }`; a workout’s `folders` name them by `id`, which is opaque.","tags":["Folders"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The location’s folders","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"description":"The location’s folders, as the app lists them","type":"array","items":{"$ref":"#/components/schemas/Folder"}}},"required":["folders"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createFolder","summary":"Create a folder","description":"Adds a folder, as the app’s New Folder does. Only the location’s owner or its HQ’s owner can. A name the location already has (in any case) changes nothing and returns `created: false`, so retrying is safe.","tags":["Folders"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Trimmed, with runs of spaces collapsed, then 3 to 60 characters. Names compare case-insensitively.","type":"string","maxLength":200}},"required":["name"],"additionalProperties":false},"examples":{"folder":{"value":{"name":"Mobility"}}}}}},"responses":{"201":{"description":"The folder and the folder list; `200` when the location already had it","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"description":"The location’s folders, as the app lists them","type":"array","items":{"$ref":"#/components/schemas/Folder"}},"folder":{"$ref":"#/components/schemas/Folder"},"created":{"description":"False when the location already had a folder by that name","type":"boolean"}},"required":["folders","folder","created"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/schedule":{"get":{"operationId":"listSchedule","summary":"List classes","description":"The location’s classes between two local dates, up to 62 days.","tags":["Schedule"],"x-cloudfit-scope":"schedule:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","required":true,"description":"First date, YYYY-MM-DD","schema":{"type":"string"},"in":"query"},{"name":"until","required":true,"description":"Last date, inclusive","schema":{"type":"string"},"in":"query"},{"name":"timeZone","description":"The location’s IANA time zone, such as Australia/Melbourne; the one its displays report when left out","schema":{"type":"string"},"in":"query"}],"responses":{"200":{"description":"The classes","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}},"truncated":{"description":"True past 1000 classes; narrow the dates","type":"boolean"}},"required":["classes","truncated"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createScheduleClass","summary":"Add a class","description":"Adds one class. Start times are on five-minute marks, at least 3 minutes from now. For repeats, week copies or many classes, use a batch.","tags":["Schedule"],"x-cloudfit-scope":"schedule:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"A 24-hour local start time on a five-minute mark, HH:mm","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timeZone":{"description":"The location’s IANA time zone; the one its displays report when left out","type":"string","minLength":1,"maxLength":64},"workout":{"description":"The workout, or null to choose one later","anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},{"type":"null"}]}},"required":["date","time","workout"],"additionalProperties":false},"examples":{"add":{"value":{"date":"2026-12-01","time":"06:00","timeZone":"Australia/Melbourne","workout":{"source":"own","id":"WORKOUT_ID"}}}}}}},"responses":{"201":{"description":"Added","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/schedule/{classId}":{"patch":{"operationId":"updateScheduleClass","summary":"Change a class","description":"Changes a class’s date, time or workout.","tags":["Schedule"],"x-cloudfit-scope":"schedule:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"classId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":true,"description":"The class’s `revision`","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"A 24-hour local start time on a five-minute mark, HH:mm","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timeZone":{"description":"Used when `date` or `time` changes; the one the location’s displays report when left out","type":"string","minLength":1,"maxLength":64},"workout":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Changed","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteScheduleClass","summary":"Delete a class","description":"Deletes one class from the calendar.","tags":["Schedule"],"x-cloudfit-scope":"schedule:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"classId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":true,"description":"The class’s `revision`","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/schedule/batch/preview":{"post":{"operationId":"previewScheduleBatch","summary":"Preview a batch","description":"Shows what a batch would do without saving: counts per date, clashes and what would be removed. Repeats need an end date, up to a year ahead.","tags":["Schedule"],"x-cloudfit-scope":"schedule:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"description":"The location’s IANA time zone; the one its displays report when left out","type":"string","minLength":1,"maxLength":64},"onConflict":{"description":"fail (the default) saves nothing if a class clashes; skip saves the rest, unless a clash is `blocking` (see the preview)","type":"string","enum":["fail","skip"]},"operations":{"description":"The changes, applied in order as one batch","minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/AddClasses"},{"$ref":"#/components/schemas/AddRepeatingClasses"},{"$ref":"#/components/schemas/WeekCopy"},{"$ref":"#/components/schemas/ClassChange"},{"$ref":"#/components/schemas/RemoveClasses"},{"$ref":"#/components/schemas/ClearDates"}],"discriminator":{"propertyName":"type"}}}},"required":["operations"],"additionalProperties":false},"examples":{"weekdays":{"value":{"timeZone":"Australia/Melbourne","operations":[{"type":"addRepeating","workout":{"source":"own","id":"WORKOUT_ID"},"times":["07:00","09:00","10:00"],"weekdays":["mon","tue","wed","thu","fri"],"from":"2026-11-30","until":"2026-12-27"}]}},"copyWeek":{"value":{"timeZone":"Australia/Melbourne","operations":[{"type":"copyWeek","weekStarting":"2026-11-30","toWeeksStarting":["2026-12-07"]}]}}}}}},"responses":{"200":{"description":"What would change","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"description":"From a preview: send when applying this batch","type":"string"},"canApply":{"description":"Applying this batch as sent would save it","type":"boolean"},"canApplyWithSkip":{"description":"Sending the same batch with `onConflict: \"skip\"` would save it, leaving out every conflict listed. False when a conflict is `blocking`","type":"boolean"},"summary":{"type":"object","properties":{"adding":{"type":"integer"},"changing":{"type":"integer"},"removing":{"type":"integer"},"alreadyScheduled":{"type":"integer"},"skipped":{"description":"Times already gone, or classes about to start","type":"integer"},"conflicts":{"type":"integer"}},"required":["adding","changing","removing","alreadyScheduled","skipped","conflicts"],"additionalProperties":false},"byDate":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"adding":{"type":"integer"},"removing":{"type":"integer"}},"required":["date","adding","removing"],"additionalProperties":false}},"conflicts":{"description":"The first 100; `summary.conflicts` counts them all","type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"time":{"type":"string"},"reason":{"type":"string","enum":["too_close","day_limit","too_soon","too_far_ahead","time_unavailable","already_scheduled"]},"classId":{"type":"string"},"blocking":{"description":"True when `onConflict: \"skip\"` can’t leave this one out (a change to a class named by ID, or a single-class add): fix it or take it out of the batch. False means skip would leave it out; `canApply` stays false until `onConflict: \"skip\"` is sent","type":"boolean"}},"required":["date","time","reason","blocking"],"additionalProperties":false}},"classes":{"description":"The first 50 added or changed","type":"array","items":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}},"removedClasses":{"description":"The first 50 the batch removes, such as the classes a week copy replaces; `summary.removing` counts them all. Show them before applying","type":"array","items":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}}},"required":["canApply","canApplyWithSkip","summary","byDate","conflicts","classes","removedClasses","warnings"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/schedule/batch":{"post":{"operationId":"applyScheduleBatch","summary":"Apply a batch","description":"Saves a batch: all of it, or nothing. A clash fails with `schedule_conflict`; with `onConflict: \"skip\"` clashing classes are left out and the rest saved, except a clash the preview marks `blocking` (a change to a class named by ID, or a single-class add), which still fails the batch. The preview’s `conflicts` lists the first 100; `summary.conflicts` counts them all.","tags":["Schedule"],"x-cloudfit-scope":"schedule:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":false,"description":"The `ETag` from the preview. Required when the batch can remove or change classes.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"description":"The location’s IANA time zone; the one its displays report when left out","type":"string","minLength":1,"maxLength":64},"onConflict":{"description":"fail (the default) saves nothing if a class clashes; skip saves the rest, unless a clash is `blocking` (see the preview)","type":"string","enum":["fail","skip"]},"operations":{"description":"The changes, applied in order as one batch","minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/AddClasses"},{"$ref":"#/components/schemas/AddRepeatingClasses"},{"$ref":"#/components/schemas/WeekCopy"},{"$ref":"#/components/schemas/ClassChange"},{"$ref":"#/components/schemas/RemoveClasses"},{"$ref":"#/components/schemas/ClearDates"}],"discriminator":{"propertyName":"type"}}}},"required":["operations"],"additionalProperties":false},"examples":{"weekdays":{"value":{"timeZone":"Australia/Melbourne","operations":[{"type":"addRepeating","workout":{"source":"own","id":"WORKOUT_ID"},"times":["07:00","09:00","10:00"],"weekdays":["mon","tue","wed","thu","fri"],"from":"2026-11-30","until":"2026-12-27"}]}},"copyWeek":{"value":{"timeZone":"Australia/Melbourne","operations":[{"type":"copyWeek","weekStarting":"2026-11-30","toWeeksStarting":["2026-12-07"]}]}}}}}},"responses":{"200":{"description":"Saved","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"description":"From a preview: send when applying this batch","type":"string"},"canApply":{"description":"Applying this batch as sent would save it","type":"boolean"},"canApplyWithSkip":{"description":"Sending the same batch with `onConflict: \"skip\"` would save it, leaving out every conflict listed. False when a conflict is `blocking`","type":"boolean"},"summary":{"type":"object","properties":{"adding":{"type":"integer"},"changing":{"type":"integer"},"removing":{"type":"integer"},"alreadyScheduled":{"type":"integer"},"skipped":{"description":"Times already gone, or classes about to start","type":"integer"},"conflicts":{"type":"integer"}},"required":["adding","changing","removing","alreadyScheduled","skipped","conflicts"],"additionalProperties":false},"byDate":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"adding":{"type":"integer"},"removing":{"type":"integer"}},"required":["date","adding","removing"],"additionalProperties":false}},"conflicts":{"description":"The first 100; `summary.conflicts` counts them all","type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"time":{"type":"string"},"reason":{"type":"string","enum":["too_close","day_limit","too_soon","too_far_ahead","time_unavailable","already_scheduled"]},"classId":{"type":"string"},"blocking":{"description":"True when `onConflict: \"skip\"` can’t leave this one out (a change to a class named by ID, or a single-class add): fix it or take it out of the batch. False means skip would leave it out; `canApply` stays false until `onConflict: \"skip\"` is sent","type":"boolean"}},"required":["date","time","reason","blocking"],"additionalProperties":false}},"classes":{"description":"The first 50 added or changed","type":"array","items":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}},"removedClasses":{"description":"The first 50 the batch removes, such as the classes a week copy replaces; `summary.removing` counts them all. Show them before applying","type":"array","items":{"type":"object","properties":{"id":{"description":"Absent in a preview: the class isn’t saved yet","type":"string"},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"Local start time, HH:mm, by the offset saved with the class","type":"string"},"startsAt":{"description":"The same moment in UTC","type":"string"},"workout":{"description":"What runs; null until a workout is chosen, and the class won’t start without one","anyOf":[{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["source","id","name"],"additionalProperties":false},{"type":"object","properties":{"source":{"description":"A CloudFit library or shared workout: show its name; it can’t be opened with the API","type":"string","const":"other"},"name":{"type":"string"}},"required":["source","name"],"additionalProperties":false}]},{"type":"null"}]},"revision":{"description":"Send as `If-Match` to change or delete this class","type":"string"}},"required":["date","time","startsAt","workout"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}}},"required":["canApply","canApplyWithSkip","summary","byDate","conflicts","classes","removedClasses","warnings"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts":{"get":{"operationId":"listWorkouts","summary":"List workouts","description":"The location’s own workouts, sorted by name, a page at a time. Lists up to 5,000; a larger library lists its 5,000 most recently updated. Pages aren’t a snapshot: a workout changed meanwhile can move between pages.","tags":["Workouts"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"archived","description":"Archived workouts instead (default false)","schema":{"type":"boolean"},"in":"query"},{"name":"favorites","description":"Favourites only","schema":{"type":"boolean"},"in":"query"},{"name":"folder","description":"Only workouts in this folder: its `id`","schema":{"type":"string"},"in":"query"},{"name":"cursor","description":"From the previous page’s `nextCursor`","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 100, default 50","schema":{"type":"integer","minimum":1,"maximum":100},"in":"query"}],"responses":{"200":{"description":"A page of workouts","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workouts":{"type":"array","items":{"type":"object","properties":{"workoutId":{"description":"Use with the workout’s routes and tools","type":"string","minLength":1,"maxLength":200},"source":{"description":"`own`: the location’s workout; `hq`: from its HQ’s library (read and copy only)","type":"string","enum":["own","hq"]},"name":{"type":"string"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"archived":{"type":"boolean"},"favorite":{"type":"boolean"},"published":{"description":"Published for customers, as the app’s list shows it; reading the workout gives the details (`publication`)","type":"boolean"},"updatedAt":{"description":"When the workout was last saved (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]},"trackCount":{"description":"Tracks, the main one included (1 = main track only), as the app last saved it","anyOf":[{"type":"number"},{"type":"null"}]},"durationSeconds":{"description":"How long it plays, from when it was last saved; reading the workout gives the full timing","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["workoutId","source","name","folders","archived","favorite","published","updatedAt","trackCount","durationSeconds"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"capped":{"description":"True when the library has more than the 5,000 most recently updated workouts a listing covers, so older ones may be missing","type":"boolean"},"hqPolicy":{"description":"HQ listings only: the HQ shares one folder, or only its favourites","type":"object","properties":{"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}]},"favoritesOnly":{"type":"boolean"}},"required":["folder","favoritesOnly"],"additionalProperties":false}},"required":["workouts","nextCursor","capped"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createWorkout","summary":"Create a workout","description":"A taken name gets the app’s next unique name (`Name #2`).","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSpec"},"examples":{"circuit":{"value":{"name":"Tuesday burner","modules":[{"id":"warmup","type":"whiteboard","settings":{"text":"Warm up","timing":{"mode":"simple","durationSeconds":300}}},{"id":"main","type":"circuit","settings":{"sets":3,"workSeconds":40,"restSeconds":20,"laps":2},"exercises":[{"reference":{"source":"builtIn","id":"air_squat"}},{"reference":{"source":"builtIn","id":"burpee"}}]},{"id":"demo","type":"demos","settings":{"sourceModuleIds":["main"]}}]}}}}}},"responses":{"201":{"description":"Created","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}},"Location":{"description":"The new workout","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"name":{"description":"The name it was saved under: a taken name gets the next unique one (\"Name #2\"), so report this one","type":"string"},"revision":{"type":"string","minLength":1,"maxLength":100},"moduleIds":{"description":"The module IDs you sent, mapped to the new modules’ IDs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}}},"required":["workoutId","name","revision","moduleIds","warnings"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/hq-workouts":{"get":{"operationId":"listHqWorkouts","summary":"List HQ workouts","description":"The library this location uses from its HQ, as the app shows it: the HQ may share one folder or only its favourites (`hqPolicy`). Empty when the location doesn’t use an HQ’s workouts. Same selection and paging as the own listing.","tags":["Workouts"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"archived","description":"Archived workouts instead (default false)","schema":{"type":"boolean"},"in":"query"},{"name":"favorites","description":"Favourites only","schema":{"type":"boolean"},"in":"query"},{"name":"folder","description":"Only workouts in this folder: its `id`","schema":{"type":"string"},"in":"query"},{"name":"cursor","description":"From the previous page’s `nextCursor`","schema":{"type":"string"},"in":"query"},{"name":"limit","description":"1 to 100, default 50","schema":{"type":"integer","minimum":1,"maximum":100},"in":"query"}],"responses":{"200":{"description":"A page of workouts","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workouts":{"type":"array","items":{"type":"object","properties":{"workoutId":{"description":"Use with the workout’s routes and tools","type":"string","minLength":1,"maxLength":200},"source":{"description":"`own`: the location’s workout; `hq`: from its HQ’s library (read and copy only)","type":"string","enum":["own","hq"]},"name":{"type":"string"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"archived":{"type":"boolean"},"favorite":{"type":"boolean"},"published":{"description":"Published for customers, as the app’s list shows it; reading the workout gives the details (`publication`)","type":"boolean"},"updatedAt":{"description":"When the workout was last saved (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]},"trackCount":{"description":"Tracks, the main one included (1 = main track only), as the app last saved it","anyOf":[{"type":"number"},{"type":"null"}]},"durationSeconds":{"description":"How long it plays, from when it was last saved; reading the workout gives the full timing","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["workoutId","source","name","folders","archived","favorite","published","updatedAt","trackCount","durationSeconds"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"capped":{"description":"True when the library has more than the 5,000 most recently updated workouts a listing covers, so older ones may be missing","type":"boolean"},"hqPolicy":{"description":"HQ listings only: the HQ shares one folder, or only its favourites","type":"object","properties":{"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}]},"favoritesOnly":{"type":"boolean"}},"required":["folder","favoritesOnly"],"additionalProperties":false}},"required":["workouts","nextCursor","capped"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/validate":{"post":{"operationId":"validateWorkout","summary":"Validate a workout","description":"Checks a workout spec without creating it: everything create does except writing. Name uniqueness is not checked.","tags":["Workouts"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSpec"},"examples":{"circuit":{"value":{"name":"Tuesday burner","modules":[{"id":"warmup","type":"whiteboard","settings":{"text":"Warm up","timing":{"mode":"simple","durationSeconds":300}}},{"id":"main","type":"circuit","settings":{"sets":3,"workSeconds":40,"restSeconds":20,"laps":2},"exercises":[{"reference":{"source":"builtIn","id":"air_squat"}},{"reference":{"source":"builtIn","id":"burpee"}}]},{"id":"demo","type":"demos","settings":{"sourceModuleIds":["main"]}}]}}}}}},"responses":{"200":{"description":"The spec is valid","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean","const":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}},"timing":{"description":"Computed from the modules; null when the workout is too complex to time","anyOf":[{"type":"object","properties":{"indefinite":{"description":"True when the workout repeats forever (`repeat: \"forever\"`), so it has no end","type":"boolean"},"cycleSeconds":{"description":"How long one play of the main track takes; null when it can’t be timed","anyOf":[{"type":"number"},{"type":"null"}]},"totalSeconds":{"description":"How long the workout plays in all; null when it repeats forever or can’t be timed","anyOf":[{"type":"number"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"track":{"description":"1 is the main track, 2 to 5 are additional tracks","type":"integer"},"cycleSeconds":{"description":"How long one play of this track takes","anyOf":[{"type":"number"},{"type":"null"}]},"withCountdownSeconds":{"description":"The same, plus the countdown the displays show before the workout starts","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["track","cycleSeconds","withCountdownSeconds"],"additionalProperties":false}}},"required":["indefinite","cycleSeconds","totalSeconds","tracks"],"additionalProperties":false},{"type":"null"}]},"modules":{"description":"Each module’s length, in the order the workout plays them (by track, then order)","type":"array","items":{"type":"object","properties":{"id":{"description":"The module’s `id` from the spec","type":"string","minLength":1,"maxLength":200},"type":{"type":"string"},"track":{"description":"1 is the main track, 2 to 5 are additional","anyOf":[{"type":"integer"},{"type":"null"}]},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","type","track","seconds"],"additionalProperties":false}}},"required":["valid","warnings","timing","modules"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/{workoutId}":{"get":{"operationId":"getWorkout","summary":"Get a workout","description":"Shows the settings that have been set, and whether each part can be edited. Use the `ETag` as `If-Match` when editing or duplicating.","tags":["Workouts"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The workout","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workout"}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteWorkout","summary":"Delete a workout","description":"Deletes one of the location’s own workouts, as the app’s delete does: it disappears everywhere, and its published copy, if any, is removed. To recover a deleted workout, contact CloudFit support. To hide a workout but keep it, archive it instead (`updateMetadata` with `archived: true`). Refused with `workout_scheduled` while it has upcoming classes, here or at a location using it (`details.classes` lists them); remove them first. A published workout can only be deleted by the location’s owner, as in the app (`permission_denied` for anyone else). Deleting a workout that is already deleted changes nothing (`alreadyDeleted`). 10 a day per location.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"description":"The `ETag` of the workout as you read it","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"deleted":{"type":"boolean","const":true},"alreadyDeleted":{"description":"True when the workout was already deleted, so nothing changed","type":"boolean"}},"required":["workoutId","deleted","alreadyDeleted"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/hq-workouts/{workoutId}":{"get":{"operationId":"getHqWorkout","summary":"Get an HQ workout","description":"One workout from the HQ’s library. It can be copied into this location, not edited. Use the `ETag` as `If-Match` when copying.","tags":["Workouts"],"x-cloudfit-scope":"workouts:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The workout","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workout"}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/{workoutId}/duplicate":{"post":{"operationId":"duplicateWorkout","summary":"Duplicate a workout","description":"Copies one of this location’s workouts.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":false,"description":"The revision you read, to copy exactly that version; optional, since copying doesn’t change the source.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The copy's name before it is made unique; the source's by default","type":"string","minLength":1,"maxLength":200},"unavailableExercises":{"default":"reject","type":"string","enum":["reject","omit"]},"unsupportedModules":{"description":"Modules of a type the API doesn’t support: refuse the copy, or leave them out","default":"reject","type":"string","enum":["reject","omit"]}},"additionalProperties":false},"examples":{"copy":{"value":{"name":"Saturday Bootcamp (Main Street)","unavailableExercises":"omit"}}}}}},"responses":{"201":{"description":"Copied","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}},"Location":{"description":"The new workout","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"name":{"description":"The name it was saved under: a taken name gets the next unique one (\"Name #2\"), so report this one","type":"string"},"revision":{"type":"string","minLength":1,"maxLength":100},"moduleIds":{"description":"The module IDs you sent, mapped to the new modules’ IDs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}},"omittedExercises":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}}},"required":["workoutId","name","revision","moduleIds","warnings","omittedExercises"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/hq-workouts/{workoutId}/duplicate":{"post":{"operationId":"duplicateHqWorkout","summary":"Duplicate an HQ workout","description":"Copies a workout from the HQ’s library into this location, where it can be edited.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":false,"description":"The revision you read, to copy exactly that version; optional, since copying doesn’t change the source.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The copy's name before it is made unique; the source's by default","type":"string","minLength":1,"maxLength":200},"unavailableExercises":{"default":"reject","type":"string","enum":["reject","omit"]},"unsupportedModules":{"description":"Modules of a type the API doesn’t support: refuse the copy, or leave them out","default":"reject","type":"string","enum":["reject","omit"]}},"additionalProperties":false},"examples":{"copy":{"value":{"name":"Saturday Bootcamp (Main Street)","unavailableExercises":"omit"}}}}}},"responses":{"201":{"description":"Copied","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}},"Location":{"description":"The new workout","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"name":{"description":"The name it was saved under: a taken name gets the next unique one (\"Name #2\"), so report this one","type":"string"},"revision":{"type":"string","minLength":1,"maxLength":100},"moduleIds":{"description":"The module IDs you sent, mapped to the new modules’ IDs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}},"omittedExercises":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}}},"required":["workoutId","name","revision","moduleIds","warnings","omittedExercises"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/{workoutId}/edits/preview":{"post":{"operationId":"previewWorkoutEdits","summary":"Preview edits","description":"Shows the workout a batch of edits would produce, without writing anything.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"description":"The `ETag` of the workout as you read it","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/UpdateMetadata"},{"$ref":"#/components/schemas/ReplaceExercises"},{"$ref":"#/components/schemas/AddModule"},{"$ref":"#/components/schemas/MoveModule"},{"$ref":"#/components/schemas/RemoveModule"},{"$ref":"#/components/schemas/UpdateDisplays"},{"$ref":"#/components/schemas/UpdateModuleSettings"}],"discriminator":{"propertyName":"type"}}}},"required":["operations"],"additionalProperties":false},"examples":{"rename":{"value":{"operations":[{"type":"updateMetadata","patch":{"name":"Tuesday burner"}}]}},"archive":{"value":{"operations":[{"type":"updateMetadata","patch":{"archived":true}}]}},"addModule":{"value":{"operations":[{"type":"addModule","afterModuleId":null,"module":{"id":"finisher","type":"flow","settings":{"sets":1,"workSeconds":60,"restSeconds":0},"exercises":[{"reference":{"source":"builtIn","id":"burpee"}}]}}]}}}}}},"responses":{"200":{"description":"The resulting workout","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":100},"moduleIds":{"description":"The module IDs you sent, mapped to the new modules’ IDs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}},"workout":{"$ref":"#/components/schemas/Workout"}},"required":["revision","moduleIds","warnings","workout"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/{workoutId}/edits":{"post":{"operationId":"applyWorkoutEdits","summary":"Apply edits","description":"Applies a batch of edits atomically. Preview the same edits first.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Retrying with the same key and body returns the first response; seven days. 1 to 128 of `A-Z a-z 0-9 _ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,128}$"}},{"name":"If-Match","in":"header","required":true,"description":"The `ETag` of the workout as you read it","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/UpdateMetadata"},{"$ref":"#/components/schemas/ReplaceExercises"},{"$ref":"#/components/schemas/AddModule"},{"$ref":"#/components/schemas/MoveModule"},{"$ref":"#/components/schemas/RemoveModule"},{"$ref":"#/components/schemas/UpdateDisplays"},{"$ref":"#/components/schemas/UpdateModuleSettings"}],"discriminator":{"propertyName":"type"}}}},"required":["operations"],"additionalProperties":false},"examples":{"rename":{"value":{"operations":[{"type":"updateMetadata","patch":{"name":"Tuesday burner"}}]}},"archive":{"value":{"operations":[{"type":"updateMetadata","patch":{"archived":true}}]}},"addModule":{"value":{"operations":[{"type":"addModule","afterModuleId":null,"module":{"id":"finisher","type":"flow","settings":{"sets":1,"workSeconds":60,"restSeconds":0},"exercises":[{"reference":{"source":"builtIn","id":"burpee"}}]}}]}}}}}},"responses":{"200":{"description":"Applied","headers":{"Request-Id":{"schema":{"type":"string"}},"ETag":{"description":"The revision, for `If-Match`","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"string","minLength":1,"maxLength":100},"moduleIds":{"description":"The module IDs you sent, mapped to the new modules’ IDs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, in words to show a person","type":"string"}},"required":["code","message"],"additionalProperties":{}}},"changed":{"description":"False when the batch changed nothing, so nothing was written","type":"boolean"}},"required":["workoutId","revision","moduleIds","warnings","changed"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry with the same `Idempotency-Key`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/workouts/{workoutId}/publication":{"post":{"operationId":"publishWorkout","summary":"Publish a workout","description":"Publishes one of the location’s own workouts for customers, as the app’s Share with Customers does: a public web version that runs in a browser at the returned `url`. When it is already published, this replaces the published version with the workout as it is now (the app’s Update Published Version); the link stays the same. Publishing makes the workout public, so do it only when the user asks. Only the location’s owner can publish, as in the app (`permission_denied` for anyone else). The main track must play 5 to 60 minutes (`publish_duration_invalid`); `GET` shows `publication.publishable` and the warnings to read first. The body is optional. 30 publishes, updates and unpublishes a day per location.","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"description":"The `ETag` of the workout as you read it","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"description":"When the public link stops working (ISO 8601, in the future). Omitted keeps the current expiry (none on a first publish); null removes it","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"welcomeImage":{"description":"An image from the media library (an image’s `mediaId` from the media library) shown before the workout starts. Omitted keeps the current one; null removes it","anyOf":[{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"maxLength":1500}},"required":["mediaId"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Published","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"published":{"type":"boolean","const":true},"updated":{"description":"True when it was already published and its published version was replaced","type":"boolean"},"url":{"description":"The public link customers open","type":"string"},"publishedAt":{"type":"string"},"expiresAt":{"description":"When the link stops working; null for never","anyOf":[{"type":"string"},{"type":"null"}]},"warnings":{"description":"What the app warns about for a published workout, which runs on one screen","type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code"],"additionalProperties":{}}}},"required":["workoutId","published","updated","url","publishedAt","expiresAt","warnings"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"What you read has changed since (`revision_stale`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"428":{"description":"`If-Match` is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"unpublishWorkout","summary":"Unpublish a workout","description":"Takes a published workout down, as the app’s unpublish does: the public link stops working, and the workout keeps its stats. Only the location’s owner can unpublish. Unpublishing a workout that isn’t published changes nothing (`alreadyUnpublished`).","tags":["Workouts"],"x-cloudfit-scope":"workouts:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workoutId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Unpublished","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"published":{"type":"boolean","const":false},"alreadyUnpublished":{"description":"True when it wasn’t published, so nothing changed","type":"boolean"}},"required":["workoutId","published","alreadyUnpublished"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/{exerciseId}/usage":{"get":{"operationId":"getExerciseUsage","summary":"Where an exercise is used","description":"Which of the location’s workouts use one of its own exercises, and what deleting it would do to them: they drop it, or, for one that replaced a built-in exercise’s video, go back to the built-in exercise. Changes nothing.","tags":["Exercises"],"x-cloudfit-scope":"exercises:read","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"exerciseId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The workouts using it","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"onDelete":{"description":"What deleting it does to these workouts: they drop it, or (for an exercise that replaced a built-in one’s video) go back to the built-in exercise","type":"string","enum":["removedFromWorkouts","builtInRestored"]},"workoutCount":{"description":"Workouts that use it","type":"integer"},"workouts":{"description":"Up to 50 of them, by name; `workoutCount` counts them all","type":"array","items":{"type":"object","properties":{"workoutId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string"}},"required":["workoutId","name"],"additionalProperties":false}}},"required":["exerciseId","name","onDelete","workoutCount","workouts"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/locations/{locationId}/custom-exercises/{exerciseId}":{"delete":{"operationId":"deleteExercise","summary":"Delete an exercise","description":"Deletes one of the location’s own exercises, as the app’s delete does, and can’t be undone: every workout using it drops it, or goes back to the built-in exercise whose video it replaced. Check its usage first. Refused while its media is processing (`exercise_processing`). Repeating a delete made through the API reports `alreadyDeleted`; one deleted in the app is `exercise_not_found`. 20 a day per location.","tags":["Exercises"],"x-cloudfit-scope":"exercises:write","parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"exerciseId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","headers":{"Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1,"maxLength":200},"deleted":{"type":"boolean","const":true},"alreadyDeleted":{"description":"True when this API had already deleted it, so nothing changed","type":"boolean"},"workoutsChanged":{"type":"integer"},"builtInRestored":{"type":"boolean"}},"required":["exerciseId","deleted","alreadyDeleted","workoutsChanged","builtInRestored"],"additionalProperties":false}}}},"400":{"description":"The request is malformed (`request_invalid`, a bad header or query parameter)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, expired or revoked token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, or not permitted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such route, or a location or workout the token can’t see","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The `Idempotency-Key` was used for a different request, or classes clash","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request can’t be accepted as asked (see `code`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see `Retry-After`","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable; retry shortly","headers":{"Retry-After":{"description":"Seconds to wait before trying again","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A CloudFit personal API token"}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"description":"Stable machine-readable error code","type":"string"},"detail":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["type","title","status","code","requestId"],"additionalProperties":false},"AddClasses":{"title":"Add classes","type":"object","properties":{"type":{"type":"string","const":"add"},"workout":{"description":"The workout to run, or null to choose one later","anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},{"type":"null"}]},"times":{"description":"Local start times","minItems":1,"maxItems":48,"type":"array","items":{"description":"A 24-hour local start time on a five-minute mark, HH:mm","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"dates":{"minItems":1,"maxItems":366,"type":"array","items":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["type","workout","times","dates"],"additionalProperties":false},"AddModule":{"title":"Add module","type":"object","properties":{"type":{"type":"string","const":"addModule"},"module":{"oneOf":[{"$ref":"#/components/schemas/CircuitModuleInput"},{"$ref":"#/components/schemas/ExercisesModuleInput"},{"$ref":"#/components/schemas/ZonesModuleInput"},{"$ref":"#/components/schemas/FlowModuleInput"},{"$ref":"#/components/schemas/DemosModuleInput"},{"$ref":"#/components/schemas/WhiteboardModuleInput"}],"discriminator":{"propertyName":"type"}},"afterModuleId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["type","module","afterModuleId"],"additionalProperties":false},"AddRepeatingClasses":{"title":"Add repeating classes","type":"object","properties":{"type":{"type":"string","const":"addRepeating"},"workout":{"description":"The workout to run, or null to choose one later","anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},{"type":"null"}]},"times":{"description":"Local start times","minItems":1,"maxItems":48,"type":"array","items":{"description":"A 24-hour local start time on a five-minute mark, HH:mm","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"from":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"until":{"description":"The last date to fill, up to a year ahead; required","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","workout","times","weekdays","from","until"],"additionalProperties":false},"CircuitModule":{"title":"Circuit module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"circuit"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 30 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"laps":{"description":"\"Circuit Laps\": how many times the whole circuit of exercises is worked","type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each lap. 0 skips them","type":"integer","minimum":0,"maximum":86400},"introSeconds":{"description":"\"Circuit Introduction\": time before the circuit to introduce it. 0 skips it","type":"integer","minimum":0,"maximum":86400},"demoSeconds":{"description":"\"Demo Time (per exercise)\": a demo of each exercise first. 0 skips the demos","type":"integer","minimum":0,"maximum":86400},"warmupSeconds":{"description":"\"Warm-up Time\": a warm-up before the main circuit. 0 skips it","type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false},"exercises":{"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["id","track","editability","seconds","exerciseCount","type","settings","exercises"],"additionalProperties":false},"CircuitModuleInput":{"title":"Circuit module input","description":"Only for a class that moves around the room through stations. Each station is worked for `sets` sets of work and rest, then everyone moves to the next, for `laps` laps of the room, usually with a drink break after each lap. If the class doesn’t rotate through stations, use an exercises module","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"circuit"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","default":true,"type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","default":1,"type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","default":40,"type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","default":20,"type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 30 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"laps":{"description":"\"Circuit Laps\": how many times the whole circuit of exercises is worked","default":1,"type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each lap. 0 skips them","default":0,"type":"integer","minimum":0,"maximum":86400},"introSeconds":{"description":"\"Circuit Introduction\": time before the circuit to introduce it. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400},"demoSeconds":{"description":"\"Demo Time (per exercise)\": a demo of each exercise first. 0 skips the demos","default":0,"type":"integer","minimum":0,"maximum":86400},"warmupSeconds":{"description":"\"Warm-up Time\": a warm-up before the main circuit. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false},"exercises":{"default":[],"maxItems":60,"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignmentWithoutTimings"}}},"required":["id","type","settings"],"additionalProperties":false},"CircuitSettingsChange":{"title":"Circuit settings change","type":"object","properties":{"type":{"type":"string","const":"circuit"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 30 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"laps":{"description":"\"Circuit Laps\": how many times the whole circuit of exercises is worked","type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each lap. 0 skips them","type":"integer","minimum":0,"maximum":86400},"introSeconds":{"description":"\"Circuit Introduction\": time before the circuit to introduce it. 0 skips it","type":"integer","minimum":0,"maximum":86400},"demoSeconds":{"description":"\"Demo Time (per exercise)\": a demo of each exercise first. 0 skips the demos","type":"integer","minimum":0,"maximum":86400},"warmupSeconds":{"description":"\"Warm-up Time\": a warm-up before the main circuit. 0 skips it","type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false},"ClassChange":{"title":"Class change","type":"object","properties":{"type":{"type":"string","const":"update"},"classId":{"type":"string","minLength":1,"maxLength":200},"date":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"description":"A 24-hour local start time on a five-minute mark, HH:mm","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"workout":{"description":"The workout to run, or null to choose one later","anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["own","hq"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},{"type":"null"}]}},"required":["type","classId"],"additionalProperties":false},"ClearDates":{"title":"Clear dates","type":"object","properties":{"type":{"type":"string","const":"clearDates"},"from":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"until":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","from","until"],"additionalProperties":false},"DemosModule":{"title":"Demos module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"demos"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"demoSeconds":{"description":"\"Demo Time (per exercise)\": how long each exercise is demonstrated","type":"integer","minimum":0,"maximum":86400},"sourceModuleIds":{"description":"\"Linked Modules\": the modules whose exercises are demonstrated (module IDs in this workout, or request IDs of modules added in the same request)","minItems":1,"maxItems":150,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"removeDuplicates":{"description":"\"Remove Duplicates\": demonstrate each exercise once","type":"boolean"},"incrementingNumberLabels":{"description":"\"Incrementing Number Labels\": number the demos 1, 2, 3…; false uses the linked modules' own labels","type":"boolean"},"ordering":{"description":"\"Ordering\": keep each linked module's order, or sort all linked exercises by their number label","type":"string","enum":["module","numberLabel"]}},"additionalProperties":false}},"required":["id","track","editability","seconds","exerciseCount","type","settings"],"additionalProperties":false},"DemosModuleInput":{"title":"Demos module input","description":"Shows how to do exercises, one at a time, usually at the start of a workout. Linked to other modules (`sourceModuleIds`), so it always demonstrates their current exercises","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"demos"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"demoSeconds":{"description":"\"Demo Time (per exercise)\": how long each exercise is demonstrated","default":5,"type":"integer","minimum":0,"maximum":86400},"sourceModuleIds":{"description":"\"Linked Modules\": the modules whose exercises are demonstrated (module IDs in this workout, or request IDs of modules added in the same request)","minItems":1,"maxItems":150,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"removeDuplicates":{"description":"\"Remove Duplicates\": demonstrate each exercise once","default":false,"type":"boolean"},"incrementingNumberLabels":{"description":"\"Incrementing Number Labels\": number the demos 1, 2, 3…; false uses the linked modules' own labels","default":true,"type":"boolean"},"ordering":{"description":"\"Ordering\": keep each linked module's order, or sort all linked exercises by their number label","default":"module","type":"string","enum":["module","numberLabel"]}},"required":["sourceModuleIds"],"additionalProperties":false}},"required":["id","type","settings"],"additionalProperties":false},"DemosSettingsChange":{"title":"Demos settings change","type":"object","properties":{"type":{"type":"string","const":"demos"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"demoSeconds":{"description":"\"Demo Time (per exercise)\": how long each exercise is demonstrated","type":"integer","minimum":0,"maximum":86400},"sourceModuleIds":{"description":"\"Linked Modules\": the modules whose exercises are demonstrated (module IDs in this workout, or request IDs of modules added in the same request)","minItems":1,"maxItems":150,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"removeDuplicates":{"description":"\"Remove Duplicates\": demonstrate each exercise once","type":"boolean"},"incrementingNumberLabels":{"description":"\"Incrementing Number Labels\": number the demos 1, 2, 3…; false uses the linked modules' own labels","type":"boolean"},"ordering":{"description":"\"Ordering\": keep each linked module's order, or sort all linked exercises by their number label","type":"string","enum":["module","numberLabel"]}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false},"Editable":{"title":"Editable","type":"object","properties":{"level":{"type":"string","const":"editable"}},"required":["level"],"additionalProperties":false},"ExerciseAssignment":{"title":"Exercise assignment","type":"object","properties":{"assignmentId":{"description":"From a workout read. Keep it when sending a module’s exercises back so the entry keeps what the API doesn’t show","type":"string","minLength":1,"maxLength":100},"reference":{"$ref":"#/components/schemas/ExerciseReference"},"overrides":{"type":"object","properties":{"label":{"description":"A name to show instead of the exercise’s own","type":"string","maxLength":2000},"display":{"description":"Which display shows the exercise (Display 1, 2, … as the location’s displays are numbered) in the module’s manual display mode; automatic and mirror ignore it. A display that isn’t paired, or is off for the module’s track, shows nothing (warning `exercises_on_missing_display`)","type":"integer","minimum":1,"maximum":100},"numberLabel":{"description":"The station label shown with the exercise, e.g. \"A1\"","type":"string","maxLength":100},"timingsSeconds":{"description":"This exercise’s own sets, as work and rest pairs in seconds: [work, rest, work, rest, …]","minItems":2,"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":86400}}},"additionalProperties":false}},"required":["reference"],"additionalProperties":false},"ExerciseAssignmentWithoutTimings":{"title":"Exercise assignment without timings","description":"In circuit, exercises and zones modules the module times every exercise","type":"object","properties":{"assignmentId":{"description":"From a workout read. Keep it when sending a module’s exercises back so the entry keeps what the API doesn’t show","type":"string","minLength":1,"maxLength":100},"reference":{"$ref":"#/components/schemas/ExerciseReference"},"overrides":{"type":"object","properties":{"label":{"description":"A name to show instead of the exercise’s own","type":"string","maxLength":2000},"display":{"description":"Which display shows the exercise (Display 1, 2, … as the location’s displays are numbered) in the module’s manual display mode; automatic and mirror ignore it. A display that isn’t paired, or is off for the module’s track, shows nothing (warning `exercises_on_missing_display`)","type":"integer","minimum":1,"maximum":100},"numberLabel":{"description":"The station label shown with the exercise, e.g. \"A1\"","type":"string","maxLength":100}},"additionalProperties":false}},"required":["reference"],"additionalProperties":false},"ExerciseReference":{"title":"Exercise reference","type":"object","properties":{"source":{"description":"`builtIn`: CloudFit's exercise library. `own`: this location's custom exercises. `hq`: its HQ's custom exercises, when this location uses them.","type":"string","enum":["builtIn","own","hq"]},"id":{"description":"The exercise ID, from exercise search or the location’s custom exercises","type":"string","minLength":1,"maxLength":200}},"required":["source","id"],"additionalProperties":false},"ExercisesModule":{"title":"Exercises module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"exercises"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"timer":{"description":"\"Timer Style\": count down to zero, or up from zero","type":"string","enum":["countdown","countUp"]},"layout":{"description":"\"Layout\": `normal` has the top bar (logo, timer, progress); `logo` shows the brand logo and exercises; `exercises` shows only the exercises","type":"string","enum":["normal","logo","exercises"]},"showModuleProgress":{"description":"Show the module progress bar even where the layout would hide it","type":"boolean"},"timing":{"description":"`simple` is the app’s \"Exercises\" (sets of work and rest), `flexi` its \"Flexi Exercises\" (a timeline of intervals). Send the other mode to switch","oneOf":[{"$ref":"#/components/schemas/SimpleExercisesTimingPartial"},{"$ref":"#/components/schemas/FlexiTimingPartial"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false},"exercises":{"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["id","track","editability","seconds","exerciseCount","type","settings","exercises"],"additionalProperties":false},"ExercisesModuleInput":{"title":"Exercises module input","description":"Exercise videos in a grid on screen together, with almost any timing (AMRAPs, EMOMs, intervals and more). The app’s \"Exercises\" (`timing.mode: simple`, sets of work and rest) or \"Flexi Exercises\" (`flexi`, any combination of intervals and repeats)","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"exercises"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"timer":{"description":"\"Timer Style\": count down to zero, or up from zero","default":"countdown","type":"string","enum":["countdown","countUp"]},"layout":{"description":"\"Layout\": `normal` has the top bar (logo, timer, progress); `logo` shows the brand logo and exercises; `exercises` shows only the exercises","default":"normal","type":"string","enum":["normal","logo","exercises"]},"showModuleProgress":{"description":"Show the module progress bar even where the layout would hide it","default":false,"type":"boolean"},"timing":{"description":"`simple` is the app’s \"Exercises\" (sets of work and rest), `flexi` its \"Flexi Exercises\" (a timeline of intervals). Send the other mode to switch","default":{"mode":"simple"},"oneOf":[{"$ref":"#/components/schemas/SimpleExercisesTiming"},{"$ref":"#/components/schemas/FlexiTiming"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false},"exercises":{"default":[],"maxItems":60,"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignmentWithoutTimings"}}},"required":["id","type","settings"],"additionalProperties":false},"ExercisesSettingsChange":{"title":"Exercises settings change","type":"object","properties":{"type":{"type":"string","const":"exercises"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"exerciseOrder":{"description":"\"Ordering\": how exercises fill each display's grid. `horizontal` (the default when unset) goes across rows first, `vertical` down columns first. `snakeHorizontal`/`snakeVertical` (\"Snake\") treat all displays as one strip and change direction each row or column; the app refuses snake in automatic display mode when the displays mix portrait and landscape (see the location’s displays), and manual display mode ignores it","type":"string","enum":["horizontal","vertical","snakeHorizontal","snakeVertical"]},"startPosition":{"description":"\"Start Position\": where exercise 1 is. `left` (the default when unset) starts top left; `right` starts top right and runs right to left","type":"string","enum":["left","right"]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"timer":{"description":"\"Timer Style\": count down to zero, or up from zero","type":"string","enum":["countdown","countUp"]},"layout":{"description":"\"Layout\": `normal` has the top bar (logo, timer, progress); `logo` shows the brand logo and exercises; `exercises` shows only the exercises","type":"string","enum":["normal","logo","exercises"]},"showModuleProgress":{"description":"Show the module progress bar even where the layout would hide it","type":"boolean"},"timing":{"description":"`simple` is the app’s \"Exercises\" (sets of work and rest), `flexi` its \"Flexi Exercises\" (a timeline of intervals). Send the other mode to switch","oneOf":[{"$ref":"#/components/schemas/SimpleExercisesTimingPartial"},{"$ref":"#/components/schemas/FlexiTimingPartial"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false},"FlexiTiming":{"title":"Flexi timing","description":"\"Flexi Timings\": a timeline of intervals, transitions and repeated groups","type":"object","properties":{"mode":{"type":"string","const":"flexi"},"intervals":{"description":"The timeline, in order. Omitted, a module switching from simple timing keeps its sets, work, rest and get-ready as intervals (as the app converts them), and a new module starts with the app’s default","maxItems":200,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Interval"},{"$ref":"#/components/schemas/Transition"},{"$ref":"#/components/schemas/SetStart"},{"$ref":"#/components/schemas/SetEnd"},{"$ref":"#/components/schemas/Group"}],"discriminator":{"propertyName":"type"}}}},"required":["mode"],"additionalProperties":false},"FlexiTimingPartial":{"title":"Flexi timing (partial)","type":"object","properties":{"mode":{"type":"string","const":"flexi"},"intervals":{"description":"The timeline, in order. Omitted, a module switching from simple timing keeps its sets, work, rest and get-ready as intervals (as the app converts them), and a new module starts with the app’s default","maxItems":200,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Interval"},{"$ref":"#/components/schemas/Transition"},{"$ref":"#/components/schemas/SetStart"},{"$ref":"#/components/schemas/SetEnd"},{"$ref":"#/components/schemas/Group"}],"discriminator":{"propertyName":"type"}}}},"required":["mode"],"additionalProperties":false},"FlowModule":{"title":"Flow module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"flow"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Flow Layout\": `normal` (\"Original\") shows the top bar and the current and next exercises side by side; `fullScreen` shows the current exercise full screen","type":"string","enum":["normal","fullScreen"]},"previewSeconds":{"description":"\"Next Exercise Preview Time\": how long the full-screen layout previews the next exercise. 0 turns it off","type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false},"exercises":{"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["id","track","editability","seconds","exerciseCount","type","settings","exercises"],"additionalProperties":false},"FlowModuleInput":{"title":"Flow module input","description":"One exercise video at a time that the whole room does together: warm-ups, cool-downs, and follow-along workouts. Each exercise runs for `sets` sets (or its own `timingsSeconds`), previewing the next","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"flow"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","default":true,"type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","default":1,"type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","default":40,"type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","default":20,"type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Flow Layout\": `normal` (\"Original\") shows the top bar and the current and next exercises side by side; `fullScreen` shows the current exercise full screen","default":"normal","type":"string","enum":["normal","fullScreen"]},"previewSeconds":{"description":"\"Next Exercise Preview Time\": how long the full-screen layout previews the next exercise. 0 turns it off","default":10,"type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false},"exercises":{"default":[],"maxItems":60,"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["id","type","settings"],"additionalProperties":false},"FlowSettingsChange":{"title":"Flow settings change","type":"object","properties":{"type":{"type":"string","const":"flow"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"numberStyle":{"description":"\"Number Style\": the label in the corner of each exercise. `sequential` (1, 2, 3, the default when unset), `hidden` (none), or grouped by `groupSize`: `letterFirst` (A1, A2… B1), `letterLast` (1A, 2A… 1B), `numberDot` (1.1, 1.2… 2.1), `numberDash` (1-1, 1-2… 2-1), `groupNumberLetter` (1A, 1B… 2A). An exercise's own `overrides.numberLabel` always wins","type":"string","enum":["sequential","hidden","letterFirst","letterLast","numberDot","numberDash","groupNumberLetter"]},"groupSize":{"description":"\"Group Size\": how many exercises share a group letter or number in the grouped number styles. The app offers 2 to 10; unset is 1. Sequential and hidden ignore it","type":"integer","minimum":1,"maximum":10},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Flow Layout\": `normal` (\"Original\") shows the top bar and the current and next exercises side by side; `fullScreen` shows the current exercise full screen","type":"string","enum":["normal","fullScreen"]},"previewSeconds":{"description":"\"Next Exercise Preview Time\": how long the full-screen layout previews the next exercise. 0 turns it off","type":"integer","minimum":0,"maximum":86400}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false},"Folder":{"title":"Folder","description":"A folder workouts can be filed under","type":"object","properties":{"id":{"description":"A folder’s `id`, exactly as the folder list gives it","type":"string","minLength":1,"maxLength":200},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"Group":{"title":"Group","description":"Repeats its timings `repeats` times","type":"object","properties":{"type":{"type":"string","const":"group"},"repeats":{"type":"integer","minimum":1,"maximum":100},"timings":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Interval"},{"$ref":"#/components/schemas/Transition"},{"$ref":"#/components/schemas/SetStart"},{"$ref":"#/components/schemas/SetEnd"},{"$ref":"#/components/schemas/InnerGroup"}],"discriminator":{"propertyName":"type"}}}},"required":["type","repeats","timings"],"additionalProperties":false},"InnerGroup":{"title":"Inner group","description":"Repeats its timings `repeats` times","type":"object","properties":{"type":{"type":"string","const":"group"},"repeats":{"type":"integer","minimum":1,"maximum":100},"timings":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Interval"},{"$ref":"#/components/schemas/Transition"},{"$ref":"#/components/schemas/SetStart"},{"$ref":"#/components/schemas/SetEnd"},{"$ref":"#/components/schemas/InnermostGroup"}],"discriminator":{"propertyName":"type"}}}},"required":["type","repeats","timings"],"additionalProperties":false},"InnermostGroup":{"title":"Innermost group","description":"Repeats its timings `repeats` times","type":"object","properties":{"type":{"type":"string","const":"group"},"repeats":{"type":"integer","minimum":1,"maximum":100},"timings":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Interval"},{"$ref":"#/components/schemas/Transition"},{"$ref":"#/components/schemas/SetStart"},{"$ref":"#/components/schemas/SetEnd"}],"discriminator":{"propertyName":"type"}}}},"required":["type","repeats","timings"],"additionalProperties":false},"Interval":{"title":"Interval","type":"object","properties":{"type":{"type":"string","const":"interval"},"category":{"type":"string","enum":["work","rest","drink","custom"]},"seconds":{"type":"integer","minimum":0,"maximum":86400},"text":{"type":"string","maxLength":200},"color":{"description":"`#AARRGGBB`: alpha first, then red, green and blue, as the app stores it (`#FF2196F3` is opaque blue)","type":"string","pattern":"^#[0-9A-Fa-f]{8}$"}},"required":["type","category","seconds"],"additionalProperties":false},"MediaLibraryBackground":{"title":"Media library background","type":"object","properties":{"mediaId":{"description":"An image or video’s `mediaId` from the media library","type":"string","minLength":1,"maxLength":1500},"dim":{"description":"\"Dim Background\": darken it so the text stays readable. The app’s default is on","type":"boolean"},"fit":{"description":"`cover` fills the screen, cropping if needed; `contain` shows it all","type":"string","enum":["cover","contain"]},"loop":{"description":"\"Loop Video\" (videos only): loop the video (the default), or false to play it once","type":"boolean"},"endModuleWhenVideoEnds":{"description":"\"When Video Ends\" (videos played once): end the module when the video ends, even before its timing does (the default), or false to keep the module going","type":"boolean"},"mute":{"description":"\"Mute Video\" (videos only): muted by default. Unmuted audio may not stay in sync across several displays","type":"boolean"},"highQuality":{"description":"\"Video Quality\" (videos only): play the original upload (slower to load) instead of the optimised copy (the default). Only videos that kept their original can","type":"boolean"}},"required":["mediaId"],"additionalProperties":false},"MetadataOnly":{"title":"Metadata only","type":"object","properties":{"level":{"type":"string","const":"metadataOnly"},"reason":{"description":"It has a module of a type the API can’t time or edit","type":"string","const":"workout_locked"}},"required":["level","reason"],"additionalProperties":false},"ModuleEditability":{"title":"Module editability","type":"object","properties":{"settings":{"description":"Whether `updateModuleSettings` can change the settings","type":"boolean"},"exercises":{"description":"Whether `replaceExercises` can change the exercises","type":"boolean"},"reason":{"description":"Why the settings can’t be edited (a stable code)","type":"string"},"issues":{"description":"Settings the API can’t show yet","type":"array","items":{"type":"string"}}},"required":["settings","exercises"],"additionalProperties":false},"MoveModule":{"title":"Move module","type":"object","properties":{"type":{"type":"string","const":"moveModule"},"moduleId":{"type":"string","minLength":1,"maxLength":200},"afterModuleId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"track":{"description":"The track to move it to: 1 is the main track, 2 to 5 are additional tracks","type":"integer","minimum":1,"maximum":5}},"required":["type","moduleId","afterModuleId","track"],"additionalProperties":false},"Publication":{"description":"The location’s own workouts (not its HQ’s, and not in create or edit results): whether it’s published for customers, and the checks publishing runs","title":"Publication","type":"object","properties":{"published":{"type":"boolean"},"url":{"description":"The public link while published","anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"description":"When it was last published or updated","anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"description":"When the link stops working; null for never","anyOf":[{"type":"string"},{"type":"null"}]},"expired":{"description":"Published, but past its expiry, so customers can’t open it","type":"boolean"},"changedSincePublished":{"description":"The workout was saved after it was last published, so the published version may be older; publishing again updates it","type":"boolean"},"stats":{"description":"Counted by the public player; kept when unpublished","type":"object","properties":{"loads":{"type":"number"},"starts":{"type":"number"},"completions":{"type":"number"}},"required":["loads","starts","completions"],"additionalProperties":false},"publishable":{"description":"Whether it can be published: its main track plays 5 to 60 minutes","type":"boolean"},"warnings":{"description":"What the app warns about before publishing; the player runs on one screen. Show them to the user before publishing","type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, for people","type":"string"}},"required":["code"],"additionalProperties":{}}}},"required":["published","url","publishedAt","expiresAt","expired","changedSincePublished","stats","publishable","warnings"],"additionalProperties":false},"ReadOnly":{"title":"Read only","type":"object","properties":{"level":{"type":"string","const":"readOnly"},"reason":{"description":"`hq_workout`: copy it into the location to edit it","type":"string","enum":["hq_workout"]}},"required":["level","reason"],"additionalProperties":false},"RemoveClasses":{"title":"Remove classes","type":"object","properties":{"type":{"type":"string","const":"remove"},"classIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["type","classIds"],"additionalProperties":false},"RemoveModule":{"title":"Remove module","type":"object","properties":{"type":{"type":"string","const":"removeModule"},"moduleId":{"type":"string","minLength":1,"maxLength":200}},"required":["type","moduleId"],"additionalProperties":false},"ReplaceExercises":{"title":"Replace exercises","type":"object","properties":{"type":{"type":"string","const":"replaceExercises"},"moduleId":{"type":"string","minLength":1,"maxLength":200},"exercises":{"maxItems":60,"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["type","moduleId","exercises"],"additionalProperties":false},"SetEnd":{"title":"Set end","description":"Marks where a set ends","type":"object","properties":{"type":{"type":"string","const":"setEnd"}},"required":["type"],"additionalProperties":false},"SetStart":{"title":"Set start","description":"Marks where a set starts, so the displays can count sets","type":"object","properties":{"type":{"type":"string","const":"setStart"}},"required":["type"],"additionalProperties":false},"SimpleExercisesTiming":{"title":"Simple exercises timing","description":"Sets of work and rest at each exercise, after an optional get-ready","type":"object","properties":{"mode":{"type":"string","const":"simple"},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","default":1,"type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","default":40,"type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","default":20,"type":"integer","minimum":0,"maximum":86400}},"required":["mode"],"additionalProperties":false},"SimpleExercisesTimingPartial":{"title":"Simple exercises timing (partial)","type":"object","properties":{"mode":{"type":"string","const":"simple"},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400}},"required":["mode"],"additionalProperties":false},"SimpleWhiteboardTiming":{"title":"Simple whiteboard timing","description":"One duration","type":"object","properties":{"mode":{"type":"string","const":"simple"},"durationSeconds":{"description":"How long the whiteboard shows","default":30,"type":"integer","minimum":0,"maximum":86400}},"required":["mode"],"additionalProperties":false},"SimpleWhiteboardTimingPartial":{"title":"Simple whiteboard timing (partial)","type":"object","properties":{"mode":{"type":"string","const":"simple"},"durationSeconds":{"description":"How long the whiteboard shows","type":"integer","minimum":0,"maximum":86400}},"required":["mode"],"additionalProperties":false},"Transition":{"title":"Transition","type":"object","properties":{"type":{"type":"string","const":"transition"},"seconds":{"type":"integer","minimum":0,"maximum":86400},"text":{"type":"string","maxLength":200},"color":{"description":"`#AARRGGBB`: alpha first, then red, green and blue, as the app stores it (`#FF2196F3` is opaque blue)","type":"string","pattern":"^#[0-9A-Fa-f]{8}$"}},"required":["type","seconds"],"additionalProperties":false},"UnsupportedModule":{"title":"Unsupported module","description":"A module type the API can show but not edit; a workout with one is locked","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"unsupported"},"appType":{"description":"The module type’s name in the CloudFit app","type":"string"},"settings":{"type":"null"}},"required":["id","track","editability","seconds","exerciseCount","type","settings"],"additionalProperties":false},"UpdateDisplays":{"title":"Update displays","description":"Changes which track some displays play in this workout, or their mode; displays not listed keep their setting. Track 1 with mode `default` returns a display to its usual setting","type":"object","properties":{"type":{"type":"string","const":"updateDisplays"},"displays":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/WorkoutDisplayChange"}}},"required":["type","displays"],"additionalProperties":false},"UpdateMetadata":{"title":"Update metadata","type":"object","properties":{"type":{"type":"string","const":"updateMetadata"},"patch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":10000},"folders":{"description":"Folders to file the workout under, by `id` from the location's folder list (a folder as a read shows it works too); create a folder first to use a new one. Sending folders replaces the workout's folders","maxItems":100,"type":"array","items":{"anyOf":[{"description":"A folder’s `id`, exactly as the folder list gives it","type":"string","minLength":1,"maxLength":200},{"type":"object","properties":{"id":{"description":"A folder’s `id`, exactly as the folder list gives it","type":"string","minLength":1,"maxLength":200},"name":{"type":"string"}},"required":["id"]}]}},"archived":{"description":"Archived workouts are hidden from the app’s lists and can be restored: archive a workout to hide it but keep it (up to 10 a day per location), and set false to restore it. Deleting is a separate request","type":"boolean"},"repeat":{"description":"Play the workout once, or loop it until stopped","type":"string","enum":["once","forever"]}},"additionalProperties":false}},"required":["type","patch"],"additionalProperties":false},"UpdateModuleSettings":{"title":"Update module settings","type":"object","properties":{"type":{"type":"string","const":"updateModuleSettings"},"moduleId":{"type":"string","minLength":1,"maxLength":200},"module":{"oneOf":[{"$ref":"#/components/schemas/CircuitSettingsChange"},{"$ref":"#/components/schemas/ExercisesSettingsChange"},{"$ref":"#/components/schemas/ZonesSettingsChange"},{"$ref":"#/components/schemas/FlowSettingsChange"},{"$ref":"#/components/schemas/DemosSettingsChange"},{"$ref":"#/components/schemas/WhiteboardSettingsChange"}],"discriminator":{"propertyName":"type"}}},"required":["type","moduleId","module"],"additionalProperties":false},"UploadedBackground":{"title":"Uploaded background","description":"An image upload, by its `uploadId`; it’s in the media library already, so its `mediaId` works too","type":"object","properties":{"uploadId":{"description":"The image upload’s ID, from creating it","type":"string","minLength":1,"maxLength":64},"dim":{"description":"\"Dim Background\": darken it so the text stays readable. The app’s default is on","type":"boolean"},"fit":{"description":"`cover` fills the screen, cropping if needed; `contain` shows it all","type":"string","enum":["cover","contain"]}},"required":["uploadId"],"additionalProperties":false},"UploadedCanvasImage":{"title":"Uploaded canvas image","type":"object","properties":{"uploadId":{"description":"The image upload’s ID, from creating it","type":"string","minLength":1,"maxLength":64}},"required":["uploadId"],"additionalProperties":false},"WeekCopy":{"title":"Week copy","type":"object","properties":{"type":{"type":"string","const":"copyWeek"},"weekStarting":{"description":"First day of the 7 days to copy","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"toWeeksStarting":{"description":"First day of each week to fill; each replaces that week","minItems":1,"maxItems":8,"type":"array","items":{"description":"A date on the gym’s calendar, YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["type","weekStarting","toWeeksStarting"],"additionalProperties":false},"WhiteboardModule":{"title":"Whiteboard module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"whiteboard"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"background":{"description":"\"Whiteboard Background\": an image or video from the media library. Omit to leave it as it is, null to remove it","anyOf":[{"anyOf":[{"$ref":"#/components/schemas/MediaLibraryBackground"},{"$ref":"#/components/schemas/UploadedBackground"}]},{"type":"null"}]},"canvasImage":{"description":"An image shown instead of the text, as the app’s canvas editor would. Omit to leave it as it is, null to remove it. Set it on a saved module or when creating the workout; the app can keep or remove it but not edit it","anyOf":[{"$ref":"#/components/schemas/UploadedCanvasImage"},{"type":"null"}]},"text":{"description":"\"Whiteboard Text\": what the screen shows","type":"string","maxLength":50000},"showTimer":{"description":"\"Countdown Timer\": show the remaining time","type":"boolean"},"showLogo":{"description":"\"Brand Logo\": show the brand logo","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Layout\": `textFirst` (the default when unset) shows the text with the logo, timer and sets beside it; `textLast` puts the logo, timer and sets first; `textHidden` shows only the logo, timer and sets, full screen. The app offers it on flexi whiteboards","type":"string","enum":["textFirst","textLast","textHidden"]},"timer":{"description":"\"Timer Style\": count down to zero (the default when unset), or up from zero. The app offers it on flexi whiteboards","type":"string","enum":["countdown","countUp"]},"timing":{"description":"`simple` is the app’s \"Whiteboard\" (one duration), `flexi` its \"Flexi Whiteboard\" (a timeline of intervals). Send the other mode to switch","oneOf":[{"$ref":"#/components/schemas/SimpleWhiteboardTimingPartial"},{"$ref":"#/components/schemas/FlexiTimingPartial"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false},"canvasImage":{"description":"The whiteboard shows an image from the app’s canvas editor instead of its `text`","type":"boolean"}},"required":["id","track","editability","seconds","exerciseCount","type","settings","canvasImage"],"additionalProperties":false},"WhiteboardModuleInput":{"title":"Whiteboard module input","description":"Text or media on screen, with an optional timer: welcomes, information about the workout or a part of it, and finishes. The app’s \"Whiteboard\" (`timing.mode: simple`, one timer) or \"Flexi Whiteboard\" (`flexi`, intervals and repeats)","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"whiteboard"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"background":{"description":"\"Whiteboard Background\": an image or video from the media library. Omit to leave it as it is, null to remove it","anyOf":[{"anyOf":[{"$ref":"#/components/schemas/MediaLibraryBackground"},{"$ref":"#/components/schemas/UploadedBackground"}]},{"type":"null"}]},"canvasImage":{"description":"An image shown instead of the text, as the app’s canvas editor would. Omit to leave it as it is, null to remove it. Set it on a saved module or when creating the workout; the app can keep or remove it but not edit it","anyOf":[{"$ref":"#/components/schemas/UploadedCanvasImage"},{"type":"null"}]},"text":{"description":"\"Whiteboard Text\": what the screen shows","default":"","type":"string","maxLength":50000},"showTimer":{"description":"\"Countdown Timer\": show the remaining time","default":true,"type":"boolean"},"showLogo":{"description":"\"Brand Logo\": show the brand logo","default":true,"type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Layout\": `textFirst` (the default when unset) shows the text with the logo, timer and sets beside it; `textLast` puts the logo, timer and sets first; `textHidden` shows only the logo, timer and sets, full screen. The app offers it on flexi whiteboards","type":"string","enum":["textFirst","textLast","textHidden"]},"timer":{"description":"\"Timer Style\": count down to zero (the default when unset), or up from zero. The app offers it on flexi whiteboards","type":"string","enum":["countdown","countUp"]},"timing":{"description":"`simple` is the app’s \"Whiteboard\" (one duration), `flexi` its \"Flexi Whiteboard\" (a timeline of intervals). Send the other mode to switch","default":{"mode":"simple"},"oneOf":[{"$ref":"#/components/schemas/SimpleWhiteboardTiming"},{"$ref":"#/components/schemas/FlexiTiming"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false}},"required":["id","type","settings"],"additionalProperties":false},"WhiteboardSettingsChange":{"title":"Whiteboard settings change","type":"object","properties":{"type":{"type":"string","const":"whiteboard"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"background":{"description":"\"Whiteboard Background\": an image or video from the media library. Omit to leave it as it is, null to remove it","anyOf":[{"anyOf":[{"$ref":"#/components/schemas/MediaLibraryBackground"},{"$ref":"#/components/schemas/UploadedBackground"}]},{"type":"null"}]},"canvasImage":{"description":"An image shown instead of the text, as the app’s canvas editor would. Omit to leave it as it is, null to remove it. Set it on a saved module or when creating the workout; the app can keep or remove it but not edit it","anyOf":[{"$ref":"#/components/schemas/UploadedCanvasImage"},{"type":"null"}]},"text":{"description":"\"Whiteboard Text\": what the screen shows","type":"string","maxLength":50000},"showTimer":{"description":"\"Countdown Timer\": show the remaining time","type":"boolean"},"showLogo":{"description":"\"Brand Logo\": show the brand logo","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"layout":{"description":"\"Layout\": `textFirst` (the default when unset) shows the text with the logo, timer and sets beside it; `textLast` puts the logo, timer and sets first; `textHidden` shows only the logo, timer and sets, full screen. The app offers it on flexi whiteboards","type":"string","enum":["textFirst","textLast","textHidden"]},"timer":{"description":"\"Timer Style\": count down to zero (the default when unset), or up from zero. The app offers it on flexi whiteboards","type":"string","enum":["countdown","countUp"]},"timing":{"description":"`simple` is the app’s \"Whiteboard\" (one duration), `flexi` its \"Flexi Whiteboard\" (a timeline of intervals). Send the other mode to switch","oneOf":[{"$ref":"#/components/schemas/SimpleWhiteboardTimingPartial"},{"$ref":"#/components/schemas/FlexiTimingPartial"}],"discriminator":{"propertyName":"mode"}}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false},"Workout":{"title":"Workout","type":"object","properties":{"workoutId":{"description":"Use with the workout’s routes and tools","type":"string","minLength":1,"maxLength":200},"source":{"description":"`own`: the location’s workout; `hq`: from its HQ’s library (read and copy only)","type":"string","enum":["own","hq"]},"revision":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string"},"description":{"type":"string"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"archived":{"type":"boolean"},"favorite":{"type":"boolean"},"repeat":{"description":"Play the workout once, or loop it until stopped","type":"string","enum":["once","forever"]},"editability":{"oneOf":[{"$ref":"#/components/schemas/Editable"},{"$ref":"#/components/schemas/MetadataOnly"},{"$ref":"#/components/schemas/ReadOnly"}],"discriminator":{"propertyName":"level"}},"modules":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/CircuitModule"},{"$ref":"#/components/schemas/ExercisesModule"},{"$ref":"#/components/schemas/ZonesModule"},{"$ref":"#/components/schemas/FlowModule"},{"$ref":"#/components/schemas/DemosModule"},{"$ref":"#/components/schemas/WhiteboardModule"},{"$ref":"#/components/schemas/UnsupportedModule"}],"discriminator":{"propertyName":"type"}}},"displays":{"description":"Displays this workout sets a track or mode for; any other display plays the main track in its usual mode","type":"array","items":{"type":"object","properties":{"display":{"description":"The display’s number, as the location’s displays are numbered","type":"integer"},"track":{"description":"The track it plays: 1 is the main track","type":"integer"},"mode":{"description":"`unknown`: a mode set in the app that the API doesn’t offer","type":"string","enum":["default","enabled","disabled","timer","unknown"]}},"required":["display","track","mode"],"additionalProperties":false}},"timing":{"description":"Computed from the modules; null when the workout is too complex to time","anyOf":[{"type":"object","properties":{"indefinite":{"description":"True when the workout repeats forever (`repeat: \"forever\"`), so it has no end","type":"boolean"},"cycleSeconds":{"description":"How long one play of the main track takes; null when it can’t be timed","anyOf":[{"type":"number"},{"type":"null"}]},"totalSeconds":{"description":"How long the workout plays in all; null when it repeats forever or can’t be timed","anyOf":[{"type":"number"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"track":{"description":"1 is the main track, 2 to 5 are additional tracks","type":"integer"},"cycleSeconds":{"description":"How long one play of this track takes","anyOf":[{"type":"number"},{"type":"null"}]},"withCountdownSeconds":{"description":"The same, plus the countdown the displays show before the workout starts","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["track","cycleSeconds","withCountdownSeconds"],"additionalProperties":false}}},"required":["indefinite","cycleSeconds","totalSeconds","tracks"],"additionalProperties":false},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Stable machine-readable warning code","type":"string"},"message":{"description":"What it means, for people","type":"string"}},"required":["code"],"additionalProperties":{}}},"publication":{"$ref":"#/components/schemas/Publication"}},"required":["workoutId","source","revision","name","description","folders","archived","favorite","repeat","editability","modules","displays","timing","warnings"],"additionalProperties":false},"WorkoutDisplay":{"title":"Workout display","type":"object","properties":{"display":{"description":"The display’s number, as the location’s displays are numbered","type":"integer","minimum":1,"maximum":50},"track":{"description":"The track the display plays: 1 is the main track, 2 to 5 are Track 2 to 5","default":1,"type":"integer","minimum":1,"maximum":5},"mode":{"default":"default","description":"What the display does in this workout: `default` uses the display’s own mode; `enabled` plays the workout; `disabled` shows standby; `timer` shows a full-screen timer","type":"string","enum":["default","enabled","disabled","timer"]}},"required":["display"],"additionalProperties":false},"WorkoutDisplayChange":{"title":"Workout display change","type":"object","properties":{"display":{"description":"The display’s number, as the location’s displays are numbered","type":"integer","minimum":1,"maximum":50},"track":{"description":"The track the display plays: 1 is the main track, 2 to 5 are Track 2 to 5","type":"integer","minimum":1,"maximum":5},"mode":{"description":"What the display does in this workout: `default` uses the display’s own mode; `enabled` plays the workout; `disabled` shows standby; `timer` shows a full-screen timer","type":"string","enum":["default","enabled","disabled","timer"]}},"required":["display"],"additionalProperties":false},"WorkoutSpec":{"title":"Workout spec","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"default":"","type":"string","maxLength":10000},"folders":{"default":[],"description":"Folders to file the workout under, by `id` from the location's folder list (a folder as a read shows it works too); create a folder first to use a new one. Sending folders replaces the workout's folders","maxItems":100,"type":"array","items":{"anyOf":[{"description":"A folder’s `id`, exactly as the folder list gives it","type":"string","minLength":1,"maxLength":200},{"type":"object","properties":{"id":{"description":"A folder’s `id`, exactly as the folder list gives it","type":"string","minLength":1,"maxLength":200},"name":{"type":"string"}},"required":["id"]}]}},"archived":{"default":false,"description":"Archived workouts are hidden from the app’s lists and can be restored: archive a workout to hide it but keep it (up to 10 a day per location), and set false to restore it. Deleting is a separate request","type":"boolean"},"repeat":{"default":"once","description":"Play the workout once, or loop it until stopped","type":"string","enum":["once","forever"]},"modules":{"minItems":1,"maxItems":150,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/CircuitModuleInput"},{"$ref":"#/components/schemas/ExercisesModuleInput"},{"$ref":"#/components/schemas/ZonesModuleInput"},{"$ref":"#/components/schemas/FlowModuleInput"},{"$ref":"#/components/schemas/DemosModuleInput"},{"$ref":"#/components/schemas/WhiteboardModuleInput"}],"discriminator":{"propertyName":"type"}}},"displays":{"description":"Which track each display plays in this workout, and optionally its mode. A display not listed plays the main track in its usual mode, so a workout on the main track alone needs none. For a split room, list every display: \"TVs 1–3 cardio, 4–6 strength\" is displays 1 to 3 on track 1 and 4 to 6 on track 2","default":[],"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/WorkoutDisplay"}}},"required":["name","modules"],"additionalProperties":false},"ZonesModule":{"title":"Zones module","type":"object","properties":{"id":{"description":"The module’s ID, for edits","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays it: 1 is the main track, 2 to 5 are additional tracks; null when it plays on no track","anyOf":[{"type":"integer"},{"type":"null"}]},"editability":{"$ref":"#/components/schemas/ModuleEditability"},"seconds":{"description":"How long the module plays, repeats included","anyOf":[{"type":"number"},{"type":"null"}]},"exerciseCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":{"type":"string","const":"zones"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"zones":{"description":"\"Number of zones\": how many groups the exercises are split into","type":"integer","minimum":1,"maximum":6},"laps":{"description":"\"Zone laps\": how many times each zone is worked before moving to the next","type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each zone. 0 skips them","type":"integer","minimum":0,"maximum":86400},"labelStyle":{"description":"\"Zone label style\": how station labels combine the zone and the exercise number","type":"string","enum":["letterFirst","letterLast","numberDot","numberDash"]}},"additionalProperties":false},"exercises":{"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignment"}}},"required":["id","track","editability","seconds","exerciseCount","type","settings","exercises"],"additionalProperties":false},"ZonesModuleInput":{"title":"Zones module input","description":"Only for a room split into zones that each run as a mini circuit. The class works through one zone’s stations (`laps` times, each for `sets` sets) and finishes that zone before everyone moves to the next, with an optional drink break between zones. When someone says \"zones\" without that flow, use a circuit (moving around the room) or an exercises module","type":"object","properties":{"id":{"description":"Your key for the module in this request (demos link to it; the response gives the module’s saved ID for each)","type":"string","minLength":1,"maxLength":200},"track":{"description":"Which track plays the module: 1 is the main track, the main part of the workout, which sets its length; 2 to 5 are additional tracks (Track 2 to Track 5) that run at the same time on other displays. Most workouts use only the main track. Additional tracks are for a room split into parts running different modules at once (a HIIT side and a strength side, or groups that swap after a set time); the workout’s `displays` say which displays play each track","default":1,"type":"integer","minimum":1,"maximum":5},"type":{"type":"string","const":"zones"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","default":"","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","default":1,"type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","default":0,"type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","default":true,"type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","default":1,"type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","default":40,"type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","default":20,"type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"zones":{"description":"\"Number of zones\": how many groups the exercises are split into","default":2,"type":"integer","minimum":1,"maximum":6},"laps":{"description":"\"Zone laps\": how many times each zone is worked before moving to the next","default":1,"type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each zone. 0 skips them","default":0,"type":"integer","minimum":0,"maximum":86400},"labelStyle":{"description":"\"Zone label style\": how station labels combine the zone and the exercise number","default":"letterFirst","type":"string","enum":["letterFirst","letterLast","numberDot","numberDash"]}},"additionalProperties":false},"exercises":{"default":[],"maxItems":60,"type":"array","items":{"$ref":"#/components/schemas/ExerciseAssignmentWithoutTimings"}}},"required":["id","type","settings"],"additionalProperties":false},"ZonesSettingsChange":{"title":"Zones settings change","type":"object","properties":{"type":{"type":"string","const":"zones"},"settings":{"type":"object","properties":{"name":{"description":"\"Module Name\": a short name to tell the module apart in the app, up to 30 characters. Displays never show it; empty shows the module type","type":"string","maxLength":30},"repeats":{"description":"\"Module Repeats\": how many times the whole module plays. Usually 1","type":"integer","minimum":1,"maximum":40},"getReadySeconds":{"description":"\"Get Ready\": a countdown before the module starts, to get in position. 0 skips it","type":"integer","minimum":0,"maximum":86400},"skipLastRest":{"description":"\"Skip Final Drink/Rest Break\": leave out the last rest or drink break, as the module ends there","type":"boolean"},"sets":{"description":"\"Sets Per Station\": sets at each exercise before moving to the next","type":"integer","minimum":1,"maximum":20},"workSeconds":{"description":"\"Work Time\": each set's work","type":"integer","minimum":0,"maximum":86400},"restSeconds":{"description":"\"Rest Time\": the rest after each set. 0 skips it","type":"integer","minimum":0,"maximum":86400},"setTimings":{"description":"\"Variable set timing\": a different work and rest time for each set at a station, in order (at most 20 sets). While set, it replaces `sets`, `workSeconds` and `restSeconds`. Null switches back to single set timing","anyOf":[{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"workSeconds":{"description":"This set's work, 5 s to 60 min","type":"integer","minimum":5,"maximum":3600},"restSeconds":{"description":"The rest after this set, up to 20 min. 0 skips it","type":"integer","minimum":0,"maximum":1200}},"required":["workSeconds","restSeconds"],"additionalProperties":false}},{"type":"null"}]},"displayMode":{"description":"\"Exercise Display Mode\": how exercises are spread over the displays this module's track uses. `automatic` (the default when unset) splits them evenly in list order; `manual` puts each exercise on the display in its `overrides.display` (every exercise needs one, or displays fall back to automatic); `mirror` shows the same exercises on every display. A display shows at most its `exerciseLimit` (on the location) (12, or 8 on Google TV, Chromecast and other Android displays); past it, validation warns, and the app won’t start a workout over 8 on an Android display","type":"string","enum":["automatic","manual","mirror"]},"videoLayout":{"description":"\"Exercise Video Layout\": `normal` (the default when unset) puts the number label top left and the exercise name at the bottom; `inverse` puts the number bottom left and the name at the top","type":"string","enum":["normal","inverse"]},"videoTextBackground":{"description":"\"Text Background\": put a coloured backing behind the text over exercise videos so it stays readable. Unset is on","type":"boolean"},"sound":{"description":"\"Sound\": what the displays play between periods (work, rest, drink breaks, get ready). A new module gets the location's default sound (the location’s `defaultSound`). `none` is silent; `countdownBeeps…` play over the last 3 seconds of each period, the others at its start","type":"string","enum":["none","beep1","beep2","beep3","beep4","beep5","boxingBell1","boxingBell2","boxingBell3","bell1","bell2","gong1","gong2","singingBowl1","singingBowl2","countdownBeeps1","countdownBeeps2","countdownBeeps3","countdownBeeps4","countdownBeeps5"]},"getReadySound":{"description":"\"Get Ready Sound\" (\"First Timing Sound\" with flexi timing): play the module's sound at the start of the get-ready countdown, or with flexi timing at the first interval. Unset plays it","type":"boolean"},"zones":{"description":"\"Number of zones\": how many groups the exercises are split into","type":"integer","minimum":1,"maximum":6},"laps":{"description":"\"Zone laps\": how many times each zone is worked before moving to the next","type":"integer","minimum":1,"maximum":40},"drinkBreakSeconds":{"description":"\"Drink Break Length\": the break after each zone. 0 skips them","type":"integer","minimum":0,"maximum":86400},"labelStyle":{"description":"\"Zone label style\": how station labels combine the zone and the exercise number","type":"string","enum":["letterFirst","letterLast","numberDot","numberDash"]}},"additionalProperties":false}},"required":["type","settings"],"additionalProperties":false}}}}