Change the coach's global settings for one exercise, the same…

PATCH/api/public/exercises/{exerciseId}/settings

Change the coach's global settings for one exercise, the same settings as the exercise library in the dashboard. Only supplied fields change. They apply to every training plan and every trainee that uses the exercise; to change an exercise inside one plan only, update that plan instead. To add alternatives without touching the existing ones send addAlternativeExercises; to drop specific ones send removeAlternativeExercises. alternativeExercises REPLACES the whole list ([] clears it); when that would remove existing alternatives the request is rejected with 409 CONFLICT listing them in details.removedAlternatives, and goes through only when resent with confirmRemoveAlternatives: true. An empty string clears notes or videoLink.

Authentication

Requires an API key, sent as Authorization: Bearer cp_live_....

API keys carry scopes. Get the catalog of scopes and webhook events lists every scope.

Path parameters

Path parameters
NameTypeDescription
exerciseIdrequiredstring

Exercise catalog id from GET /exercises.

Header parameters

Header parameters
NameTypeDescription
Idempotency-Keystring

Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate.

Request body

application/json, required

Request body fields
NameTypeDescription
notesstring

Coach notes shown to trainees on this exercise. Empty string clears.

Maximum length: 2000

videoLinkstring

Demonstration video URL (http/https). Empty string clears.

Maximum length: 2000

mediaDisplaystring

"gif" shows the GIF (tapping it opens the video); "thumbnail" shows the YouTube thumbnail instead and needs a YouTube videoLink.

Allowed values: gif thumbnail

trackRm1boolean

Track an estimated 1RM (Brzycki) for this exercise.

isFavoriteboolean

Mark or unmark as a coach favorite.

addAlternativeExercisesstring[]

Exercise ids (from GET /exercises) to add to the current default alternatives. Existing alternatives are kept.

Maximum items: 50

removeAlternativeExercisesstring[]

Exercise ids to remove from the current default alternatives. The rest are kept.

Maximum items: 50

alternativeExercisesstring[]

Full list of default alternative exercise ids. Replaces the current list; [] clears it. Removing existing alternatives this way needs confirmRemoveAlternatives: true. Cannot be combined with addAlternativeExercises / removeAlternativeExercises.

Maximum items: 50

confirmRemoveAlternativesboolean

Confirms that alternativeExercises may remove existing alternatives. Send only after the coach approved the removal.

Request examples

cURL
curl --request PATCH \
  --url 'https://api.coach-platform.com/api/public/exercises/<exerciseId>/settings' \
  --header 'Authorization: Bearer cp_live_...' \
  --header 'Content-Type: application/json' \
  --data '{
  "notes": "<string>"
}'
JavaScript (fetch)
const response = await fetch('https://api.coach-platform.com/api/public/exercises/<exerciseId>/settings', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer cp_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "notes": "<string>"
  }),
});

const data = await response.json();

Responses

200 OK

Successful response

Example body (application/json)
{
  "data": {
    "exerciseId": "<string>",
    "name": "<string>",
    "nameHebrew": "<string>",
    "isCustom": true,
    "notes": "<string>",
    "videoLink": "<string>",
    "mediaDisplay": "gif",
    "trackRm1": true,
    "isFavorite": true,
    "alternativeExercises": [
      {
        "exerciseId": "<string>",
        "name": "<string>",
        "nameHebrew": "<string>"
      }
    ]
  }
}
Response fields (14)
Response fields
NameTypeDescription
dataobject

The coach's own settings for one catalog exercise. They apply to every training plan and every trainee that uses the exercise.

data.exerciseIdstring
data.namestring | null
data.nameHebrewstring | null
data.isCustomboolean

True for an exercise the coach added to their own catalog.

data.notesstring | null

Coach notes shown to trainees on this exercise.

data.videoLinkstring | null

Coach demonstration video URL.

data.mediaDisplaystring

How the exercise is shown to trainees: "gif" shows the GIF (tapping it opens the video), "thumbnail" shows the YouTube video thumbnail instead of the GIF.

Allowed values: gif thumbnail

data.trackRm1boolean

Track an estimated 1RM (Brzycki) for this exercise.

data.isFavoriteboolean

Marked as a coach favorite.

data.alternativeExercisesobject[]

Default alternatives trainees may swap this exercise for, in every plan.

data.alternativeExercises[].exerciseIdstring
data.alternativeExercises[].namestring | null
data.alternativeExercises[].nameHebrewstring | null

Error responses

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict
  • 429 Too Many Requests
  • 500 Internal Server Error

These statuses share the same response body.

Example body (application/json)
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "fix": "<string>",
    "details": {},
    "retryAfterMs": 123
  }
}
Error fields (6)
Error fields
NameTypeDescription
errorobject
error.codestring
error.messagestring
error.fixstring | null
error.detailsobject | null
error.retryAfterMsnumber | null

This page is also available as Markdown. Browse it in the interactive explorer or download the OpenAPI spec.