Skip to content
Developer docsLibrary

API reference

Library

Library programmes with their revisions and the two flags, and the organisation’s own exercises and machines.

These operations take an organisation key (wwo_) with the scope each one lists, and work only on that key’s own organisation. Base URL https://api.wristworkout.com. Authentication and keys explains keys and scopes.

Library programmes

GET/v1/orgs/{orgId}/programmes

By name, with the two flags, the author and how many customers have each.

Key
Organisation key, wwo_
Scope
programmes:read
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Query parameters

cursorstring

nextCursor from the previous page.

At most 400 characters.

limitinteger

Page size, 20 when left out.

1 to 50.

archivedstring

1 lists archived programmes instead of active ones.

One of01

Response 200 · Programmes by name

itemsarray of objectsRequired
12 fields in each item
idstringRequired
namestringRequired
watchNamestringRequired

The name the watch shows, in plain ASCII.

revintegerRequired

Revision number. Every save publishes the next one; earlier revisions never change.

stationsintegerRequired
watchBytesintegerRequired

Size of the plan the watch downloads, in bytes. At most 6,000.

updatedAtintegerRequired

Unix time in seconds.

archivedbooleanRequired
customerCanEditbooleanRequired

Customers it is assigned to may change it, and their saves publish new revisions.

customerCanCopybooleanRequired

Customers it is assigned to may make a copy of their own, with a new name.

createdByobject or nullRequired

A member of the organisation.

2 fields
userIdstringRequired
displayNamestringRequired
assigneesintegerRequired

Customers with an active assignment.

nextCursorstring or nullRequired

Send it as cursor for the next page. Null on the last page.

Errors

Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl https://api.wristworkout.com/v1/orgs/org_id/programmes \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes', {
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

Create a library programme

POST/v1/orgs/{orgId}/programmes

The editor body of POST /v1/programmes, plus the two flags (both off when omitted). Stations may use built-in exercises and the organisation’s own exercises and machines.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Each new programme counts against the plan’s allowance. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Headers

Idempotency-Keystring

Makes a retry safe: the same key with the same request within 24 hours returns the first response. See idempotency.

1 to 64 letters, digits, _ and -.

Request body

namestringRequired

1 to 48 characters.

watchNamestringRequired

The name the watch shows, in plain ASCII.

Folded to plain ASCII, then 1 to 16 characters.

unitstringRequired

One ofkglb

notesstring

Never sent to the watch.

At most 2,000 characters.

progressionobject or null

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

8 fields
rulestringRequired

One ofdoublelinearpercentageeffort

repMininteger

1 to 50.

repMaxinteger

1 to 50.

incrementX100integer

1 to 5,000.

onMissstringRequired

One ofholdreduce

reducePctintegerRequired

5 to 50.

deloadEveryintegerRequired

0 to 12.

deloadPctintegerRequired

5 to 50.

stationsarray of objectsRequired

1 to 15 items.

8 fields in each item
stationIdstring

Keep it to edit an existing station. Leave it out to add a new one.

An ID of 6 letters and digits.

exerciseIdstringRequired

A built-in exercise (g_…) or one of the owner’s own.

An ID of 12 letters and digits, or a built-in ID such as g_leg_press.

machineIdstring or null

One of the owner’s machines. Left out when there is none.

An ID of 12 letters and digits.

setsarray of objectsRequired

1 to 10 items.

6 fields in each item
kindstringRequired

One ofworkwarmupdropfailureamraprest_pause

targetintegerRequired

Target reps, or seconds for a time exercise.

Reps: 1 to 100. Seconds, for a time exercise: 5 to 600.

loadX100integer or nullRequired

Load in hundredths of the unit: 16000 is 160 kg or 160 lb. Null for no external load.

0 to 100,000.

effortinteger

0 to 105.

stepsarray of integers

At most 3 items. Each item: 0 to 100,000.

pctinteger

30 to 100.

restSintegerRequired

Rest after a set, in seconds.

0 to 900.

restHrinteger or null

Rest can end early once heart rate falls to this many beats per minute. Left out when not set.

60 to 200.

notestring

Shown on the watch with the station.

Folded to plain ASCII, at most 40 characters.

progressionobject or string or any

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

Valuenone

groupsarray of objects

At most 15 items.

8 fields in each item
kindstringRequired

One ofsupersetgiantcircuitemomamrapintervals

firstintegerRequired

0 to 14.

sizeintegerRequired

1 to 15.

restBetweenSintegerRequired

0 to 300.

restRoundSintegerRequired

0 to 900.

everySinteger

20 to 600.

capSinteger

60 to 3,600.

workSinteger

Seconds the set was timed for; 0 when it was ended without starting its timer.

5 to 600.

customerCanEditboolean

Customers it is assigned to may change it; their saves publish new revisions. Off when left out.

customerCanCopyboolean

Customers it is assigned to may make a copy of their own, with a new name. Off when left out.

Any other field is refused with 422 VALIDATION.

Response 201 · Created at rev 1

revintegerRequired

Revision number. Every save publishes the next one; earlier revisions never change.

namestringRequired
watchNamestringRequired

The name the watch shows, in plain ASCII.

unitstringRequired

One ofkglb

notesstring
progressionobject

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

8 fields
rulestringRequired

One ofdoublelinearpercentageeffort

repMininteger
repMaxinteger
incrementX100integer
onMissstringRequired

One ofholdreduce

reducePctintegerRequired
deloadEveryintegerRequired
deloadPctintegerRequired
stationsarray of objectsRequired
19 fields in each item
stationIdstringRequired

The station’s ID within its programme, kept across edits.

exerciseIdstringRequired

A built-in exercise (g_…) or one of the owner’s own.

machineIdstring

One of the owner’s machines. Left out when there is none.

namestringRequired
watchLabelstringRequired

The name the watch shows, in plain ASCII.

machineLabelstring

The machine’s short label on the watch.

modestringRequired

One ofrepstimedistance

wriststringRequired

One ofdynamicstatic

unilateralbooleanRequired
loadKindstringRequired

One ofexternalbodyweightbodyweight_plusassisted

loadBasisstringRequired

One oftotalper_handper_side

loadStepX100integerRequired

How much one press changes the load on the watch, in hundredths of the unit.

fitCategoryinteger
fitNameinteger
setsarray of objectsRequired
6 fields in each item
kindstringRequired

One ofworkwarmupdropfailureamraprest_pause

targetintegerRequired

Target reps, or seconds for a time exercise.

loadX100integer or nullRequired

Load in hundredths of the unit: 16000 is 160 kg or 160 lb. Null for no external load.

effortinteger
stepsarray of integers
pctinteger
restSintegerRequired

Rest after a set, in seconds.

restHrinteger

Rest can end early once heart rate falls to this many beats per minute. Left out when not set.

notestring
progressionobject or string

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

Valuenone

groupsarray of objects
8 fields in each item
kindstringRequired

One ofsupersetgiantcircuitemomamrapintervals

firstintegerRequired
sizeintegerRequired
restBetweenSintegerRequired
restRoundSintegerRequired
everySinteger
capSinteger
workSinteger

Seconds the set was timed for; 0 when it was ended without starting its timer.

idstringRequired
watchBytesintegerRequired

Size of the plan the watch downloads, in bytes. At most 6,000.

updatedAtintegerRequired

Unix time in seconds.

archivedbooleanRequired
customerCanEditbooleanRequired

Customers it is assigned to may change it, and their saves publish new revisions.

customerCanCopybooleanRequired

Customers it is assigned to may make a copy of their own, with a new name.

createdByobject or nullRequired

A member of the organisation.

2 fields
userIdstringRequired
displayNamestringRequired
assigneesintegerRequired

Errors

422VALIDATIONA field breaks a rule. An exercise or machine that is neither built in nor the organisation’s own, or is archived, is UNKNOWN_REFERENCE.
422PLAN_TOO_LARGEThe plan the watch downloads would be over 6,000 bytes.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
422LIMIT_EXCEEDEDThe library has 500 active programmes (details.limit is activeProgrammes).
422LIMIT_EXCEEDEDplan_limitThe plan allows no more active programmes (details.limit is programmes, details.max the allowance).
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
422VALIDATIONA parameter or the body breaks the schema.
422VALIDATIONidempotency_key_reusedThe Idempotency-Key was used for a different request.
409PAYLOAD_MISMATCHidempotency_in_progressThe first request with this Idempotency-Key is still running (for up to a minute).
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

IDEMPOTENCY_KEY=$(uuidgen) # send the same key again if you retry
curl -X POST https://api.wristworkout.com/v1/orgs/org_id/programmes \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
    "name": "Leg Day A",
    "watchName": "LEG DAY A",
    "unit": "kg",
    "notes": "Warm up on the bike for five minutes first.",
    "stations": [
      {
        "exerciseId": "g_leg_press",
        "machineId": "m8Gv4YhJ2sLo",
        "sets": [
          { "kind": "warmup", "target": 12, "loadX100": 8000 },
          { "kind": "work", "target": 10, "loadX100": 16000 },
          { "kind": "work", "target": 10, "loadX100": 16000 }
        ],
        "restS": 90,
        "note": "seat 4"
      },
      {
        "exerciseId": "g_leg_extension",
        "sets": [
          { "kind": "work", "target": 12, "loadX100": 4500 },
          { "kind": "work", "target": 12, "loadX100": 4500 }
        ],
        "restS": 60
      }
    ],
    "customerCanEdit": false,
    "customerCanCopy": true
  }'
// Send the same key again if you retry.
const idempotencyKey = crypto.randomUUID();
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({
    name: 'Leg Day A',
    watchName: 'LEG DAY A',
    unit: 'kg',
    notes: 'Warm up on the bike for five minutes first.',
    stations: [
      {
        exerciseId: 'g_leg_press',
        machineId: 'm8Gv4YhJ2sLo',
        sets: [
          { kind: 'warmup', target: 12, loadX100: 8000 },
          { kind: 'work', target: 10, loadX100: 16000 },
          { kind: 'work', target: 10, loadX100: 16000 },
        ],
        restS: 90,
        note: 'seat 4',
      },
      {
        exerciseId: 'g_leg_extension',
        sets: [
          { kind: 'work', target: 12, loadX100: 4500 },
          { kind: 'work', target: 12, loadX100: 4500 },
        ],
        restS: 60,
      },
    ],
    customerCanEdit: false,
    customerCanCopy: true,
  }),
});
const data = await res.json();

A library programme at its head revision

GET/v1/orgs/{orgId}/programmes/{programmeId}

The ETag response header carries the revision, ready for If-Match when you publish.

Key
Organisation key, wwo_
Scope
programmes:read
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

Response 200 · Head revision

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo programme with that ID in the library.
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id', {
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

Publish a new revision

PUT/v1/orgs/{orgId}/programmes/{programmeId}

Send If-Match with the revision you edited. Every customer it is assigned to gets the new revision at their watch’s next sync; a workout in progress finishes on the revision it started with.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

Headers

If-MatchstringRequired

The revision you edited, such as "3" or 3. Read it from rev or from the ETag header.

At most 20 characters.

Request body

namestringRequired

1 to 48 characters.

watchNamestringRequired

The name the watch shows, in plain ASCII.

Folded to plain ASCII, then 1 to 16 characters.

unitstringRequired

One ofkglb

notesstring

Never sent to the watch.

At most 2,000 characters.

progressionobject or null

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

8 fields
rulestringRequired

One ofdoublelinearpercentageeffort

repMininteger

1 to 50.

repMaxinteger

1 to 50.

incrementX100integer

1 to 5,000.

onMissstringRequired

One ofholdreduce

reducePctintegerRequired

5 to 50.

deloadEveryintegerRequired

0 to 12.

deloadPctintegerRequired

5 to 50.

stationsarray of objectsRequired

1 to 15 items.

8 fields in each item
stationIdstring

Keep it to edit an existing station. Leave it out to add a new one.

An ID of 6 letters and digits.

exerciseIdstringRequired

A built-in exercise (g_…) or one of the owner’s own.

An ID of 12 letters and digits, or a built-in ID such as g_leg_press.

machineIdstring or null

One of the owner’s machines. Left out when there is none.

An ID of 12 letters and digits.

setsarray of objectsRequired

1 to 10 items.

6 fields in each item
kindstringRequired

One ofworkwarmupdropfailureamraprest_pause

targetintegerRequired

Target reps, or seconds for a time exercise.

Reps: 1 to 100. Seconds, for a time exercise: 5 to 600.

loadX100integer or nullRequired

Load in hundredths of the unit: 16000 is 160 kg or 160 lb. Null for no external load.

0 to 100,000.

effortinteger

0 to 105.

stepsarray of integers

At most 3 items. Each item: 0 to 100,000.

pctinteger

30 to 100.

restSintegerRequired

Rest after a set, in seconds.

0 to 900.

restHrinteger or null

Rest can end early once heart rate falls to this many beats per minute. Left out when not set.

60 to 200.

notestring

Shown on the watch with the station.

Folded to plain ASCII, at most 40 characters.

progressionobject or string or any

Progression: double (repMin, repMax), linear (incrementX100), percentage (pct on each work set) or effort (each work set's effort target); missed reps hold or reduce by reducePct after two in a row; deloadEvery sessions (0 = off) a deload lighter by deloadPct.

Valuenone

groupsarray of objects

At most 15 items.

8 fields in each item
kindstringRequired

One ofsupersetgiantcircuitemomamrapintervals

firstintegerRequired

0 to 14.

sizeintegerRequired

1 to 15.

restBetweenSintegerRequired

0 to 300.

restRoundSintegerRequired

0 to 900.

everySinteger

20 to 600.

capSinteger

60 to 3,600.

workSinteger

Seconds the set was timed for; 0 when it was ended without starting its timer.

5 to 600.

Any other field is refused with 422 VALIDATION.

Response 200 · Published

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo programme with that ID in the library.
412REVISION_CONFLICTThe programme changed since the revision in If-Match; details.rev is the current revision.
422PLAN_ARCHIVEDThe programme is archived.
422VALIDATIONA field breaks a rule. An exercise or machine that is neither built in nor the organisation’s own, or is archived, is UNKNOWN_REFERENCE.
422PLAN_TOO_LARGEThe plan the watch downloads would be over 6,000 bytes.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X PUT \
  https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "1"' \
  -d '{
    "name": "Leg Day A",
    "watchName": "LEG DAY A",
    "unit": "kg",
    "notes": "Warm up on the bike for five minutes first.",
    "stations": [
      {
        "exerciseId": "g_leg_press",
        "machineId": "m8Gv4YhJ2sLo",
        "sets": [
          { "kind": "warmup", "target": 12, "loadX100": 8000 },
          { "kind": "work", "target": 10, "loadX100": 16000 },
          { "kind": "work", "target": 10, "loadX100": 16000 }
        ],
        "restS": 90,
        "note": "seat 4",
        "stationId": "s8KQ2a"
      },
      {
        "exerciseId": "g_leg_extension",
        "sets": [
          { "kind": "work", "target": 12, "loadX100": 4500 },
          { "kind": "work", "target": 12, "loadX100": 4500 }
        ],
        "restS": 75,
        "stationId": "Ld93Kx"
      }
    ]
  }'
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
    'If-Match': '"1"',
  },
  body: JSON.stringify({
    name: 'Leg Day A',
    watchName: 'LEG DAY A',
    unit: 'kg',
    notes: 'Warm up on the bike for five minutes first.',
    stations: [
      {
        exerciseId: 'g_leg_press',
        machineId: 'm8Gv4YhJ2sLo',
        sets: [
          { kind: 'warmup', target: 12, loadX100: 8000 },
          { kind: 'work', target: 10, loadX100: 16000 },
          { kind: 'work', target: 10, loadX100: 16000 },
        ],
        restS: 90,
        note: 'seat 4',
        stationId: 's8KQ2a',
      },
      {
        exerciseId: 'g_leg_extension',
        sets: [
          { kind: 'work', target: 12, loadX100: 4500 },
          { kind: 'work', target: 12, loadX100: 4500 },
        ],
        restS: 75,
        stationId: 'Ld93Kx',
      },
    ],
  }),
});
const data = await res.json();

Set “Customer can edit” and “Customer can make a copy”

PATCH/v1/orgs/{orgId}/programmes/{programmeId}

Settings, not content: no revision is published. When editing is on and the programme has several customers, each of them can change it for all of them.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

Request body

customerCanEditboolean

Customers it is assigned to may change it; their saves publish new revisions. Unchanged when left out.

customerCanCopyboolean

Customers it is assigned to may make a copy of their own, with a new name. Unchanged when left out.

Any other field is refused with 422 VALIDATION.

Response 200 · Updated

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo programme with that ID in the library.
422VALIDATIONThe body is empty: send at least one field.
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X PATCH \
  https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "customerCanCopy": true }'
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ customerCanCopy: true }),
});
const data = await res.json();

Archive a library programme

DELETE/v1/orgs/{orgId}/programmes/{programmeId}

Its assignments end and it leaves every customer’s weekly schedule and future days. Workouts already recorded keep it.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

Response 200 · Archived

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo programme with that ID in the library.
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X DELETE \
  https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id', {
  method: 'DELETE',
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

A library programme at an earlier revision

GET/v1/orgs/{orgId}/programmes/{programmeId}/revisions/{rev}

Earlier revisions never change, so a recorded workout can always show the plan it followed.

Key
Organisation key, wwo_
Scope
programmes:read
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

revintegerRequired

A revision number, from 1.

At least 1.

Response 200 · Immutable snapshot

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo such programme, or no such revision.
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl \
  https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id/revisions/2 \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id/revisions/2', {
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

Duplicate a library programme

POST/v1/orgs/{orgId}/programmes/{programmeId}/duplicate

The copy stays in the library, with the flags off and you as its author. Useful for a version made for one customer.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Each new programme counts against the plan’s allowance. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

programmeIdstringRequired

The programme’s ID.

1 to 64 characters.

Headers

Idempotency-Keystring

Makes a retry safe: the same key with the same request within 24 hours returns the first response. See idempotency.

1 to 64 letters, digits, _ and -.

Request body optional

namestring

Required when you copy a programme you do not own. Defaults to “Copy of” and the original name.

1 to 48 characters.

watchNamestring

Defaults to the new name, or the original watch name when there is no new name.

At most 200 characters. Folded to plain ASCII and cut to 16 characters for the watch.

Any other field is refused with 422 VALIDATION.

Response 201 · Copy at rev 1

The same fields as Create a library programme.

Errors

404NOT_FOUNDNo programme with that ID in the library.
422VALIDATIONname is empty or over 48 characters.
422LIMIT_EXCEEDEDThe library has 500 active programmes (details.limit is activeProgrammes).
422LIMIT_EXCEEDEDplan_limitThe plan allows no more active programmes (details.limit is programmes, details.max the allowance).
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 128 KiB.
422VALIDATIONA parameter or the body breaks the schema.
422VALIDATIONidempotency_key_reusedThe Idempotency-Key was used for a different request.
409PAYLOAD_MISMATCHidempotency_in_progressThe first request with this Idempotency-Key is still running (for up to a minute).
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

IDEMPOTENCY_KEY=$(uuidgen) # send the same key again if you retry
curl -X POST \
  https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id/duplicate \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{ "name": "Leg Day A for Sam", "watchName": "LEG DAY SAM" }'
// Send the same key again if you retry.
const idempotencyKey = crypto.randomUUID();
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/programmes/programme_id/duplicate', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({ name: 'Leg Day A for Sam', watchName: 'LEG DAY SAM' }),
});
const data = await res.json();

The organisation’s exercises, with the built-in ones

GET/v1/orgs/{orgId}/exercises

By name. scope picks the organisation’s own exercises (mine), the built-in ones (global) or both (all, the default).

Key
Organisation key, wwo_
Scope
programmes:read
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Query parameters

cursorstring

nextCursor from the previous page.

At most 400 characters.

limitinteger

Page size, 20 when left out.

1 to 50.

qstring

Text to find in exercise names.

At most 100 characters.

musclestring

Only exercises with this muscle.

At most 40 characters.

rolestring

One ofprimaryany

equipmentstring

Only exercises with this equipment.

One ofbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandother

patternstring

One ofsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobility

gearstring

One ofbarbellez_bartrap_bardumbbellkettlebellplatesbenchincline_benchracksmith_machinecablemachineplate_loaded_machinepull_up_bardip_stationcaptains_chairhyperextension_benchpreacher_benchglute_ham_developerlandminebandmedicine_ballstability_ballsuspension_trainergymnastic_ringsab_wheelboxsledsandbagbattle_ropejump_ropeweight_beltrowerbiketreadmillski_machinestair_climberellipticalmatfoam_roller

levelstring

One ofbeginnerintermediateadvanced

favouritesstring

One of01

gymstring

An ID of 12 letters and digits.

scopestring

mine: the organisation’s own. global: built in. all, the default: both.

One ofallmineglobal

archivedstring

1 includes archived ones.

One of01

Response 200 · Own and global exercises by name

itemsarray of objectsRequired
30 fields in each item
idstringRequired
namestringRequired
watchLabelstringRequired

The name the watch shows, in plain ASCII.

musclestringRequired
equipmentstringRequired

One ofbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandother

modestringRequired

One ofrepstimedistance

loadKindstringRequired

One ofexternalbodyweightbodyweight_plusassisted

loadBasisstringRequired

One oftotalper_handper_side

wriststringRequired

One ofdynamicstatic

unilateralbooleanRequired
loadStepX100integerRequired

How much one press changes the load on the watch, in hundredths of the unit.

fitCategoryinteger or nullRequired
fitNameinteger or nullRequired
primaryMusclesarray of stringsRequired
secondaryMusclesarray of stringsRequired
patternstring or nullRequired

One ofsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobility

mechanicsstring or nullRequired

One ofcompoundisolation

levelstring or nullRequired

One ofbeginnerintermediateadvanced

lateralitystringRequired

One ofbilateralunilateralalternating

geararray of stringsRequired
aliasesarray of stringsRequired
stepsarray of stringsRequired
cuesarray of stringsRequired
mistakesarray of stringsRequired
watchCuestring or nullRequired
mediaobject or nullRequired
2 fields
stillobjectRequired
4 fields
urlstringRequired
widthintegerRequired
heightintegerRequired
altstringRequired
loopobject or nullRequired
6 fields
urlstringRequired
widthintegerRequired
heightintegerRequired
altstringRequired
durationMsintegerRequired
captionstringRequired
favouritebooleanRequired
globalbooleanRequired
archivedbooleanRequired
updatedAtintegerRequired

Unix time in seconds.

nextCursorstring or nullRequired

Send it as cursor for the next page. Null on the last page.

Errors

Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl https://api.wristworkout.com/v1/orgs/org_id/exercises \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/exercises', {
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

Create an exercise

POST/v1/orgs/{orgId}/exercises

An exercise of the organisation’s own, for its library programmes. At most 300 active exercises per organisation.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Headers

Idempotency-Keystring

Makes a retry safe: the same key with the same request within 24 hours returns the first response. See idempotency.

1 to 64 letters, digits, _ and -.

Request body

namestringRequired

1 to 48 characters.

watchLabelstring

The name the watch shows. Defaults to the name.

At most 100 characters. Folded to plain ASCII and cut to 20 characters for the watch.

musclestringRequired

1 to 40 characters.

equipmentstringRequired

One ofbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandother

modestringRequired

One ofrepstimedistance

loadKindstringRequired

One ofexternalbodyweightbodyweight_plusassisted

loadBasisstringRequired

One oftotalper_handper_side

wriststringRequired

One ofdynamicstatic

unilateralbooleanRequired
loadStepX100integerRequired

How much one press changes the load on the watch, in hundredths of the unit.

1 to 5,000.

fitCategoryinteger or null

0 to 65,534.

fitNameinteger or null

0 to 65,534.

primaryMusclesarray of strings

At most 3 items.

secondaryMusclesarray of strings

At most 6 items.

patternstring or null

One ofsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobility

lateralitystring

One ofbilateralunilateralalternating

geararray of strings

At most 5 items.

cuesarray of strings

At most 4 items. Each item: at most 90 characters.

Any other field is refused with 422 VALIDATION.

Response 201 · Created

idstringRequired
namestringRequired
watchLabelstringRequired

The name the watch shows, in plain ASCII.

musclestringRequired
equipmentstringRequired

One ofbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandother

modestringRequired

One ofrepstimedistance

loadKindstringRequired

One ofexternalbodyweightbodyweight_plusassisted

loadBasisstringRequired

One oftotalper_handper_side

wriststringRequired

One ofdynamicstatic

unilateralbooleanRequired
loadStepX100integerRequired

How much one press changes the load on the watch, in hundredths of the unit.

fitCategoryinteger or nullRequired
fitNameinteger or nullRequired
primaryMusclesarray of stringsRequired
secondaryMusclesarray of stringsRequired
patternstring or nullRequired

One ofsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobility

mechanicsstring or nullRequired

One ofcompoundisolation

levelstring or nullRequired

One ofbeginnerintermediateadvanced

lateralitystringRequired

One ofbilateralunilateralalternating

geararray of stringsRequired
aliasesarray of stringsRequired
stepsarray of stringsRequired
cuesarray of stringsRequired
mistakesarray of stringsRequired
watchCuestring or nullRequired
mediaobject or nullRequired
2 fields
stillobjectRequired
4 fields
urlstringRequired
widthintegerRequired
heightintegerRequired
altstringRequired
loopobject or nullRequired
6 fields
urlstringRequired
widthintegerRequired
heightintegerRequired
altstringRequired
durationMsintegerRequired
captionstringRequired
favouritebooleanRequired
globalbooleanRequired
archivedbooleanRequired
updatedAtintegerRequired

Unix time in seconds.

Errors

422VALIDATIONA field breaks a rule, such as a name over 48 characters.
422LIMIT_EXCEEDEDThe organisation has 300 active exercises (details.limit is privateExercises).
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 64 KiB.
422VALIDATIONA parameter or the body breaks the schema.
422VALIDATIONidempotency_key_reusedThe Idempotency-Key was used for a different request.
409PAYLOAD_MISMATCHidempotency_in_progressThe first request with this Idempotency-Key is still running (for up to a minute).
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

IDEMPOTENCY_KEY=$(uuidgen) # send the same key again if you retry
curl -X POST https://api.wristworkout.com/v1/orgs/org_id/exercises \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
    "name": "Belt squat",
    "muscle": "quads",
    "equipment": "machine",
    "mode": "reps",
    "loadKind": "external",
    "loadBasis": "total",
    "wrist": "static",
    "unilateral": false,
    "loadStepX100": 500
  }'
// Send the same key again if you retry.
const idempotencyKey = crypto.randomUUID();
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/exercises', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({
    name: 'Belt squat',
    muscle: 'quads',
    equipment: 'machine',
    mode: 'reps',
    loadKind: 'external',
    loadBasis: 'total',
    wrist: 'static',
    unilateral: false,
    loadStepX100: 500,
  }),
});
const data = await res.json();

Change an exercise

PATCH/v1/orgs/{orgId}/exercises/{id}

Send only the fields to change. Built-in exercises cannot be changed.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

idstringRequired

The exercise’s ID.

1 to 64 characters.

Request body

namestring

1 to 48 characters.

watchLabelstring

The name the watch shows. Unchanged when left out.

At most 100 characters. Folded to plain ASCII and cut to 20 characters for the watch.

musclestring

1 to 40 characters.

equipmentstring

One ofbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandother

modestring

One ofrepstimedistance

loadKindstring

One ofexternalbodyweightbodyweight_plusassisted

loadBasisstring

One oftotalper_handper_side

wriststring

One ofdynamicstatic

unilateralboolean
loadStepX100integer

How much one press changes the load on the watch, in hundredths of the unit.

1 to 5,000.

fitCategoryinteger or null

0 to 65,534.

fitNameinteger or null

0 to 65,534.

primaryMusclesarray of strings

At most 3 items.

secondaryMusclesarray of strings

At most 6 items.

patternstring or null

One ofsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobility

lateralitystring

One ofbilateralunilateralalternating

geararray of strings

At most 5 items.

cuesarray of strings

At most 4 items. Each item: at most 90 characters.

Any other field is refused with 422 VALIDATION.

Response 200 · Updated

The same fields as Create an exercise.

Errors

404NOT_FOUNDNo exercise with that ID.
403FORBIDDENThe exercise is built in. Built-in exercises are read-only.
422VALIDATIONThe body is empty: send at least one field.
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 64 KiB.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X PATCH \
  https://api.wristworkout.com/v1/orgs/org_id/exercises/exercise_id \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Belt squat, wide stance", "watchLabel": "BELT SQUAT W" }'
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/exercises/exercise_id', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Belt squat, wide stance',
    watchLabel: 'BELT SQUAT W',
  }),
});
const data = await res.json();

Archive an exercise

DELETE/v1/orgs/{orgId}/exercises/{id}

Revisions that already use it keep it, but a new revision cannot use it. Built-in exercises cannot be archived.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

idstringRequired

The exercise’s ID.

1 to 64 characters.

Response 200 · Archived (kept for history)

The same fields as Create an exercise.

Errors

404NOT_FOUNDNo exercise with that ID.
403FORBIDDENThe exercise is built in. Built-in exercises are read-only.
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X DELETE \
  https://api.wristworkout.com/v1/orgs/org_id/exercises/exercise_id \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/exercises/exercise_id', {
  method: 'DELETE',
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

The organisation’s machines

GET/v1/orgs/{orgId}/machines

By name. Machines are the organisation’s own named stations, such as Leg Press #14.

Key
Organisation key, wwo_
Scope
programmes:read
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Query parameters

cursorstring

nextCursor from the previous page.

At most 400 characters.

limitinteger

Page size, 20 when left out.

1 to 50.

archivedstring

1 includes archived ones.

One of01

gymstring

1 to 64 characters.

Response 200 · Own machines by name

itemsarray of objectsRequired
8 fields in each item
idstringRequired
namestringRequired
labelstringRequired
notesstring or nullRequired
gymIdstring or nullRequired
exerciseIdsarray of stringsRequired
archivedbooleanRequired
updatedAtintegerRequired

Unix time in seconds.

nextCursorstring or nullRequired

Send it as cursor for the next page. Null on the last page.

Errors

Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl https://api.wristworkout.com/v1/orgs/org_id/machines \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/machines', {
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();

Create a machine

POST/v1/orgs/{orgId}/machines

A named station in the gym. At most 200 active machines per organisation.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

Headers

Idempotency-Keystring

Makes a retry safe: the same key with the same request within 24 hours returns the first response. See idempotency.

1 to 64 letters, digits, _ and -.

Request body

namestringRequired

1 to 48 characters.

labelstring

A short label for the watch, such as #14. Empty when left out.

At most 40 characters. Folded to plain ASCII and cut to 8 characters for the watch.

notesstring or null

At most 2,000 characters.

gymIdstring or null

An ID of 12 letters and digits.

exerciseIdsarray of strings

At most 20 items. Each item: an ID of 12 letters and digits, or a built-in ID such as g_leg_press.

Any other field is refused with 422 VALIDATION.

Response 201 · Created

idstringRequired
namestringRequired
labelstringRequired
notesstring or nullRequired
gymIdstring or nullRequired
exerciseIdsarray of stringsRequired
archivedbooleanRequired
updatedAtintegerRequired

Unix time in seconds.

Errors

422VALIDATIONThe name is empty or over 48 characters.
422LIMIT_EXCEEDEDThe organisation has 200 active machines (details.limit is privateMachines).
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 64 KiB.
422VALIDATIONA parameter or the body breaks the schema.
422VALIDATIONidempotency_key_reusedThe Idempotency-Key was used for a different request.
409PAYLOAD_MISMATCHidempotency_in_progressThe first request with this Idempotency-Key is still running (for up to a minute).
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

IDEMPOTENCY_KEY=$(uuidgen) # send the same key again if you retry
curl -X POST https://api.wristworkout.com/v1/orgs/org_id/machines \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{ "name": "Leg Press #14", "label": "#14" }'
// Send the same key again if you retry.
const idempotencyKey = crypto.randomUUID();
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/machines', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({ name: 'Leg Press #14', label: '#14' }),
});
const data = await res.json();

Change a machine

PATCH/v1/orgs/{orgId}/machines/{id}

Send only the fields to change.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

idstringRequired

The machine’s ID.

1 to 64 characters.

Request body

namestring

1 to 48 characters.

labelstring

A short label for the watch, such as #14. Unchanged when left out.

At most 40 characters. Folded to plain ASCII and cut to 8 characters for the watch.

notesstring or null

At most 2,000 characters.

gymIdstring or null

An ID of 12 letters and digits.

exerciseIdsarray of strings

At most 20 items. Each item: an ID of 12 letters and digits, or a built-in ID such as g_leg_press.

Any other field is refused with 422 VALIDATION.

Response 200 · Updated

The same fields as Create a machine.

Errors

404NOT_FOUNDNo machine with that ID.
422VALIDATIONThe name is empty or over 48 characters.
422VALIDATIONThe body is empty: send at least one field.
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
400MALFORMEDThe body is not valid JSON.
413PAYLOAD_TOO_LARGEThe body is over 64 KiB.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X PATCH \
  https://api.wristworkout.com/v1/orgs/org_id/machines/machine_id \
  -H "Authorization: Bearer wwo_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "notes": "Seat pin sticks; use the top hole." }'
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/machines/machine_id', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer wwo_your_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ notes: 'Seat pin sticks; use the top hole.' }),
});
const data = await res.json();

Archive a machine

DELETE/v1/orgs/{orgId}/machines/{id}

Revisions that already use it keep it, but a new revision cannot use it.

Key
Organisation key, wwo_
Scope
programmes:write
Plans
Pro and Trainer/Gym. Plans and limits

Path parameters

orgIdstringRequired

The organisation’s ID. A key works only on its own organisation.

1 to 64 characters.

idstringRequired

The machine’s ID.

1 to 64 characters.

Response 200 · Archived (kept for history)

The same fields as Create a machine.

Errors

404NOT_FOUNDNo machine with that ID.
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATEDThe key is missing, unknown, expired or revoked.
403FORBIDDENinsufficient_scopeThe key lacks the scope, or is a personal key.
403FORBIDDENplan_requiredWhen API keys need a plan and the organisation has none in good standing.
404NOT_FOUNDThe organisation is not the key’s own.
403FORBIDDENThe request came from a web page (it has an Origin header). Call the API from your server.
422VALIDATIONA parameter or the body breaks the schema.
429RATE_LIMITEDThe key is over its limit for this minute, or over the service-wide 120 requests a minute (then with Retry-After: 60 and no RateLimit headers).

Example

curl -X DELETE \
  https://api.wristworkout.com/v1/orgs/org_id/machines/machine_id \
  -H "Authorization: Bearer wwo_your_key"
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/machines/machine_id', {
  method: 'DELETE',
  headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();