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/
By name, with the two flags, the author and how many customers have each.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Query parameters
cursorstringnextCursorfrom the previous page.At most 400 characters.
limitintegerPage size, 20 when left out.
1 to 50.
archivedstring1lists archived programmes instead of active ones.01
Response 200 · Programmes by name
itemsarray of objectsRequired12 fields in each item
idstringRequirednamestringRequiredwatchNamestringRequiredThe name the watch shows, in plain ASCII.
revintegerRequiredRevision number. Every save publishes the next one; earlier revisions never change.
stationsintegerRequiredwatchBytesintegerRequiredSize of the plan the watch downloads, in bytes. At most 6,000.
updatedAtintegerRequiredUnix time in seconds.
archivedbooleanRequiredcustomerCanEditbooleanRequiredCustomers it is assigned to may change it, and their saves publish new revisions.
customerCanCopybooleanRequiredCustomers it is assigned to may make a copy of their own, with a new name.
createdByobject or nullRequiredA member of the organisation.
2 fields
userIdstringRequireddisplayNamestringRequired
assigneesintegerRequiredCustomers with an active assignment.
nextCursorstring or nullRequiredSend it as
cursorfor the next page. Null on the last page.
Errors
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
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.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Headers
Idempotency-KeystringMakes 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
namestringRequired1 to 48 characters.
watchNamestringRequiredThe name the watch shows, in plain ASCII.
Folded to plain ASCII, then 1 to 16 characters.
unitstringRequiredkglbnotesstringNever sent to the watch.
At most 2,000 characters.
progressionobject or nullProgression: 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
rulestringRequireddoublelinearpercentageeffortrepMininteger1 to 50.
repMaxinteger1 to 50.
incrementX100integer1 to 5,000.
onMissstringRequiredholdreducereducePctintegerRequired5 to 50.
deloadEveryintegerRequired0 to 12.
deloadPctintegerRequired5 to 50.
stationsarray of objectsRequired1 to 15 items.
8 fields in each item
stationIdstringKeep it to edit an existing station. Leave it out to add a new one.
An ID of 6 letters and digits.
exerciseIdstringRequiredA 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 nullOne of the owner’s machines. Left out when there is none.
An ID of 12 letters and digits.
setsarray of objectsRequired1 to 10 items.
6 fields in each item
kindstringRequiredworkwarmupdropfailureamraprest_pausetargetintegerRequiredTarget reps, or seconds for a time exercise.
Reps: 1 to 100. Seconds, for a time exercise: 5 to 600.
loadX100integer or nullRequiredLoad in hundredths of the unit:
16000is 160 kg or 160 lb. Null for no external load.0 to 100,000.
effortinteger0 to 105.
stepsarray of integersAt most 3 items. Each item: 0 to 100,000.
pctinteger30 to 100.
restSintegerRequiredRest after a set, in seconds.
0 to 900.
restHrinteger or nullRest can end early once heart rate falls to this many beats per minute. Left out when not set.
60 to 200.
notestringShown on the watch with the station.
Folded to plain ASCII, at most 40 characters.
progressionobject or string or anyProgression: 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.
none
groupsarray of objectsAt most 15 items.
8 fields in each item
kindstringRequiredsupersetgiantcircuitemomamrapintervalsfirstintegerRequired0 to 14.
sizeintegerRequired1 to 15.
restBetweenSintegerRequired0 to 300.
restRoundSintegerRequired0 to 900.
everySinteger20 to 600.
capSinteger60 to 3,600.
workSintegerSeconds the set was timed for; 0 when it was ended without starting its timer.
5 to 600.
customerCanEditbooleanCustomers it is assigned to may change it; their saves publish new revisions. Off when left out.
customerCanCopybooleanCustomers 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
revintegerRequiredRevision number. Every save publishes the next one; earlier revisions never change.
namestringRequiredwatchNamestringRequiredThe name the watch shows, in plain ASCII.
unitstringRequiredkglbnotesstringprogressionobjectProgression: 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
rulestringRequireddoublelinearpercentageeffortrepMinintegerrepMaxintegerincrementX100integeronMissstringRequiredholdreducereducePctintegerRequireddeloadEveryintegerRequireddeloadPctintegerRequired
stationsarray of objectsRequired19 fields in each item
stationIdstringRequiredThe station’s ID within its programme, kept across edits.
exerciseIdstringRequiredA built-in exercise (
g_…) or one of the owner’s own.machineIdstringOne of the owner’s machines. Left out when there is none.
namestringRequiredwatchLabelstringRequiredThe name the watch shows, in plain ASCII.
machineLabelstringThe machine’s short label on the watch.
modestringRequiredrepstimedistancewriststringRequireddynamicstaticunilateralbooleanRequiredloadKindstringRequiredexternalbodyweightbodyweight_plusassistedloadBasisstringRequiredtotalper_handper_sideloadStepX100integerRequiredHow much one press changes the load on the watch, in hundredths of the unit.
fitCategoryintegerfitNameintegersetsarray of objectsRequired6 fields in each item
kindstringRequiredworkwarmupdropfailureamraprest_pausetargetintegerRequiredTarget reps, or seconds for a time exercise.
loadX100integer or nullRequiredLoad in hundredths of the unit:
16000is 160 kg or 160 lb. Null for no external load.effortintegerstepsarray of integerspctinteger
restSintegerRequiredRest after a set, in seconds.
restHrintegerRest can end early once heart rate falls to this many beats per minute. Left out when not set.
notestringprogressionobject or stringProgression: 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.
none
groupsarray of objects8 fields in each item
kindstringRequiredsupersetgiantcircuitemomamrapintervalsfirstintegerRequiredsizeintegerRequiredrestBetweenSintegerRequiredrestRoundSintegerRequiredeverySintegercapSintegerworkSintegerSeconds the set was timed for; 0 when it was ended without starting its timer.
idstringRequiredwatchBytesintegerRequiredSize of the plan the watch downloads, in bytes. At most 6,000.
updatedAtintegerRequiredUnix time in seconds.
archivedbooleanRequiredcustomerCanEditbooleanRequiredCustomers it is assigned to may change it, and their saves publish new revisions.
customerCanCopybooleanRequiredCustomers it is assigned to may make a copy of their own, with a new name.
createdByobject or nullRequiredA member of the organisation.
2 fields
userIdstringRequireddisplayNamestringRequired
assigneesintegerRequired
Errors
422VALIDATION | A 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_LARGE | The plan the watch downloads would be over 6,000 bytes. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
422LIMIT_EXCEEDED | The library has 500 active programmes (details.limit is activeProgrammes). |
422LIMIT_EXCEEDEDplan_limit | The 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
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
422VALIDATIONidempotency_key_reused | The Idempotency-Key was used for a different request. |
409PAYLOAD_MISMATCHidempotency_in_progress | The first request with this Idempotency-Key is still running (for up to a minute). |
429RATE_LIMITED | The 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/
The ETag response header carries the revision, ready for If-Match when you publish.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
Response 200 · Head revision
The same fields as Create a library programme.
Errors
404NOT_FOUND | No programme with that ID in the library. |
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
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.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
Headers
If-MatchstringRequiredThe revision you edited, such as
"3"or3. Read it fromrevor from theETagheader.At most 20 characters.
Request body
namestringRequired1 to 48 characters.
watchNamestringRequiredThe name the watch shows, in plain ASCII.
Folded to plain ASCII, then 1 to 16 characters.
unitstringRequiredkglbnotesstringNever sent to the watch.
At most 2,000 characters.
progressionobject or nullProgression: 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
rulestringRequireddoublelinearpercentageeffortrepMininteger1 to 50.
repMaxinteger1 to 50.
incrementX100integer1 to 5,000.
onMissstringRequiredholdreducereducePctintegerRequired5 to 50.
deloadEveryintegerRequired0 to 12.
deloadPctintegerRequired5 to 50.
stationsarray of objectsRequired1 to 15 items.
8 fields in each item
stationIdstringKeep it to edit an existing station. Leave it out to add a new one.
An ID of 6 letters and digits.
exerciseIdstringRequiredA 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 nullOne of the owner’s machines. Left out when there is none.
An ID of 12 letters and digits.
setsarray of objectsRequired1 to 10 items.
6 fields in each item
kindstringRequiredworkwarmupdropfailureamraprest_pausetargetintegerRequiredTarget reps, or seconds for a time exercise.
Reps: 1 to 100. Seconds, for a time exercise: 5 to 600.
loadX100integer or nullRequiredLoad in hundredths of the unit:
16000is 160 kg or 160 lb. Null for no external load.0 to 100,000.
effortinteger0 to 105.
stepsarray of integersAt most 3 items. Each item: 0 to 100,000.
pctinteger30 to 100.
restSintegerRequiredRest after a set, in seconds.
0 to 900.
restHrinteger or nullRest can end early once heart rate falls to this many beats per minute. Left out when not set.
60 to 200.
notestringShown on the watch with the station.
Folded to plain ASCII, at most 40 characters.
progressionobject or string or anyProgression: 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.
none
groupsarray of objectsAt most 15 items.
8 fields in each item
kindstringRequiredsupersetgiantcircuitemomamrapintervalsfirstintegerRequired0 to 14.
sizeintegerRequired1 to 15.
restBetweenSintegerRequired0 to 300.
restRoundSintegerRequired0 to 900.
everySinteger20 to 600.
capSinteger60 to 3,600.
workSintegerSeconds 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_FOUND | No programme with that ID in the library. |
412REVISION_CONFLICT | The programme changed since the revision in If-Match; details.rev is the current revision. |
422PLAN_ARCHIVED | The programme is archived. |
422VALIDATION | A 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_LARGE | The plan the watch downloads would be over 6,000 bytes. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
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.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
Request body
customerCanEditbooleanCustomers it is assigned to may change it; their saves publish new revisions. Unchanged when left out.
customerCanCopybooleanCustomers 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_FOUND | No programme with that ID in the library. |
422VALIDATION | The body is empty: send at least one field. |
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
Its assignments end and it leaves every customer’s weekly schedule and future days. Workouts already recorded keep it.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
Response 200 · Archived
The same fields as Create a library programme.
Errors
404NOT_FOUND | No programme with that ID in the library. |
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
Earlier revisions never change, so a recorded workout can always show the plan it followed.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
revintegerRequiredA revision number, from 1.
At least 1.
Response 200 · Immutable snapshot
The same fields as Create a library programme.
Errors
404NOT_FOUND | No such programme, or no such revision. |
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
The copy stays in the library, with the flags off and you as its author. Useful for a version made for one customer.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
programmeIdstringRequiredThe programme’s ID.
1 to 64 characters.
Headers
Idempotency-KeystringMakes 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
namestringRequired when you copy a programme you do not own. Defaults to “Copy of” and the original name.
1 to 48 characters.
watchNamestringDefaults 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_FOUND | No programme with that ID in the library. |
422VALIDATION | name is empty or over 48 characters. |
422LIMIT_EXCEEDED | The library has 500 active programmes (details.limit is activeProgrammes). |
422LIMIT_EXCEEDEDplan_limit | The 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
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 128 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
422VALIDATIONidempotency_key_reused | The Idempotency-Key was used for a different request. |
409PAYLOAD_MISMATCHidempotency_in_progress | The first request with this Idempotency-Key is still running (for up to a minute). |
429RATE_LIMITED | The 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/
By name. scope picks the organisation’s own exercises (mine), the built-in ones (global) or both (all, the default).
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Query parameters
cursorstringnextCursorfrom the previous page.At most 400 characters.
limitintegerPage size, 20 when left out.
1 to 50.
qstringText to find in exercise names.
At most 100 characters.
musclestringOnly exercises with this
muscle.At most 40 characters.
rolestringprimaryanyequipmentstringOnly exercises with this
equipment.barbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandotherpatternstringsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobilitygearstringbarbellez_bartrap_bardumbbellkettlebellplatesbenchincline_benchracksmith_machinecablemachineplate_loaded_machinepull_up_bardip_stationcaptains_chairhyperextension_benchpreacher_benchglute_ham_developerlandminebandmedicine_ballstability_ballsuspension_trainergymnastic_ringsab_wheelboxsledsandbagbattle_ropejump_ropeweight_beltrowerbiketreadmillski_machinestair_climberellipticalmatfoam_rollerlevelstringbeginnerintermediateadvancedfavouritesstring01gymstringAn ID of 12 letters and digits.
scopestringmine: the organisation’s own.global: built in.all, the default: both.allmineglobalarchivedstring1includes archived ones.01
Response 200 · Own and global exercises by name
itemsarray of objectsRequired30 fields in each item
idstringRequirednamestringRequiredwatchLabelstringRequiredThe name the watch shows, in plain ASCII.
musclestringRequiredequipmentstringRequiredbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandothermodestringRequiredrepstimedistanceloadKindstringRequiredexternalbodyweightbodyweight_plusassistedloadBasisstringRequiredtotalper_handper_sidewriststringRequireddynamicstaticunilateralbooleanRequiredloadStepX100integerRequiredHow much one press changes the load on the watch, in hundredths of the unit.
fitCategoryinteger or nullRequiredfitNameinteger or nullRequiredprimaryMusclesarray of stringsRequiredsecondaryMusclesarray of stringsRequiredpatternstring or nullRequiredsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobilitymechanicsstring or nullRequiredcompoundisolationlevelstring or nullRequiredbeginnerintermediateadvancedlateralitystringRequiredbilateralunilateralalternatinggeararray of stringsRequiredaliasesarray of stringsRequiredstepsarray of stringsRequiredcuesarray of stringsRequiredmistakesarray of stringsRequiredwatchCuestring or nullRequiredmediaobject or nullRequired2 fields
stillobjectRequired4 fields
urlstringRequiredwidthintegerRequiredheightintegerRequiredaltstringRequired
loopobject or nullRequired6 fields
urlstringRequiredwidthintegerRequiredheightintegerRequiredaltstringRequireddurationMsintegerRequiredcaptionstringRequired
favouritebooleanRequiredglobalbooleanRequiredarchivedbooleanRequiredupdatedAtintegerRequiredUnix time in seconds.
nextCursorstring or nullRequiredSend it as
cursorfor the next page. Null on the last page.
Errors
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
An exercise of the organisation’s own, for its library programmes. At most 300 active exercises per organisation.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Headers
Idempotency-KeystringMakes 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
namestringRequired1 to 48 characters.
watchLabelstringThe name the watch shows. Defaults to the name.
At most 100 characters. Folded to plain ASCII and cut to 20 characters for the watch.
musclestringRequired1 to 40 characters.
equipmentstringRequiredbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandothermodestringRequiredrepstimedistanceloadKindstringRequiredexternalbodyweightbodyweight_plusassistedloadBasisstringRequiredtotalper_handper_sidewriststringRequireddynamicstaticunilateralbooleanRequiredloadStepX100integerRequiredHow much one press changes the load on the watch, in hundredths of the unit.
1 to 5,000.
fitCategoryinteger or null0 to 65,534.
fitNameinteger or null0 to 65,534.
primaryMusclesarray of stringsAt most 3 items.
secondaryMusclesarray of stringsAt most 6 items.
patternstring or nullsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobilitylateralitystringbilateralunilateralalternatinggeararray of stringsAt most 5 items.
cuesarray of stringsAt most 4 items. Each item: at most 90 characters.
Any other field is refused with 422 VALIDATION.
Response 201 · Created
idstringRequirednamestringRequiredwatchLabelstringRequiredThe name the watch shows, in plain ASCII.
musclestringRequiredequipmentstringRequiredbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandothermodestringRequiredrepstimedistanceloadKindstringRequiredexternalbodyweightbodyweight_plusassistedloadBasisstringRequiredtotalper_handper_sidewriststringRequireddynamicstaticunilateralbooleanRequiredloadStepX100integerRequiredHow much one press changes the load on the watch, in hundredths of the unit.
fitCategoryinteger or nullRequiredfitNameinteger or nullRequiredprimaryMusclesarray of stringsRequiredsecondaryMusclesarray of stringsRequiredpatternstring or nullRequiredsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobilitymechanicsstring or nullRequiredcompoundisolationlevelstring or nullRequiredbeginnerintermediateadvancedlateralitystringRequiredbilateralunilateralalternatinggeararray of stringsRequiredaliasesarray of stringsRequiredstepsarray of stringsRequiredcuesarray of stringsRequiredmistakesarray of stringsRequiredwatchCuestring or nullRequiredmediaobject or nullRequired2 fields
stillobjectRequired4 fields
urlstringRequiredwidthintegerRequiredheightintegerRequiredaltstringRequired
loopobject or nullRequired6 fields
urlstringRequiredwidthintegerRequiredheightintegerRequiredaltstringRequireddurationMsintegerRequiredcaptionstringRequired
favouritebooleanRequiredglobalbooleanRequiredarchivedbooleanRequiredupdatedAtintegerRequiredUnix time in seconds.
Errors
422VALIDATION | A field breaks a rule, such as a name over 48 characters. |
422LIMIT_EXCEEDED | The organisation has 300 active exercises (details.limit is privateExercises). |
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 64 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
422VALIDATIONidempotency_key_reused | The Idempotency-Key was used for a different request. |
409PAYLOAD_MISMATCHidempotency_in_progress | The first request with this Idempotency-Key is still running (for up to a minute). |
429RATE_LIMITED | The 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/
Send only the fields to change. Built-in exercises cannot be changed.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
idstringRequiredThe exercise’s ID.
1 to 64 characters.
Request body
namestring1 to 48 characters.
watchLabelstringThe name the watch shows. Unchanged when left out.
At most 100 characters. Folded to plain ASCII and cut to 20 characters for the watch.
musclestring1 to 40 characters.
equipmentstringbarbelldumbbellmachineplate_loadedcablebodyweightkettlebellbandothermodestringrepstimedistanceloadKindstringexternalbodyweightbodyweight_plusassistedloadBasisstringtotalper_handper_sidewriststringdynamicstaticunilateralbooleanloadStepX100integerHow much one press changes the load on the watch, in hundredths of the unit.
1 to 5,000.
fitCategoryinteger or null0 to 65,534.
fitNameinteger or null0 to 65,534.
primaryMusclesarray of stringsAt most 3 items.
secondaryMusclesarray of stringsAt most 6 items.
patternstring or nullsquathingelungehip_thrusthorizontal_pushvertical_pushhorizontal_pullvertical_pullchest_flyshoulder_raiserear_flyshrugelbow_flexionelbow_extensionwristknee_extensionknee_flexionhip_abductionhip_adductioncalf_raiseback_extensioncore_flexioncore_rotationlateral_flexionanti_extensionanti_rotationcarryolympicjumpthrowconditioningmobilitylateralitystringbilateralunilateralalternatinggeararray of stringsAt most 5 items.
cuesarray of stringsAt 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_FOUND | No exercise with that ID. |
403FORBIDDEN | The exercise is built in. Built-in exercises are read-only. |
422VALIDATION | The body is empty: send at least one field. |
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 64 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
Revisions that already use it keep it, but a new revision cannot use it. Built-in exercises cannot be archived.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
idstringRequiredThe exercise’s ID.
1 to 64 characters.
Response 200 · Archived (kept for history)
The same fields as Create an exercise.
Errors
404NOT_FOUND | No exercise with that ID. |
403FORBIDDEN | The exercise is built in. Built-in exercises are read-only. |
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
By name. Machines are the organisation’s own named stations, such as Leg Press #14.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Query parameters
cursorstringnextCursorfrom the previous page.At most 400 characters.
limitintegerPage size, 20 when left out.
1 to 50.
archivedstring1includes archived ones.01gymstring1 to 64 characters.
Response 200 · Own machines by name
itemsarray of objectsRequired8 fields in each item
idstringRequirednamestringRequiredlabelstringRequirednotesstring or nullRequiredgymIdstring or nullRequiredexerciseIdsarray of stringsRequiredarchivedbooleanRequiredupdatedAtintegerRequiredUnix time in seconds.
nextCursorstring or nullRequiredSend it as
cursorfor the next page. Null on the last page.
Errors
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
A named station in the gym. At most 200 active machines per organisation.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Headers
Idempotency-KeystringMakes 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
namestringRequired1 to 48 characters.
labelstringA 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 nullAt most 2,000 characters.
gymIdstring or nullAn ID of 12 letters and digits.
exerciseIdsarray of stringsAt 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
idstringRequirednamestringRequiredlabelstringRequirednotesstring or nullRequiredgymIdstring or nullRequiredexerciseIdsarray of stringsRequiredarchivedbooleanRequiredupdatedAtintegerRequiredUnix time in seconds.
Errors
422VALIDATION | The name is empty or over 48 characters. |
422LIMIT_EXCEEDED | The organisation has 200 active machines (details.limit is privateMachines). |
Errors any call can get: 400, 401, 403, 404, 409, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 64 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
422VALIDATIONidempotency_key_reused | The Idempotency-Key was used for a different request. |
409PAYLOAD_MISMATCHidempotency_in_progress | The first request with this Idempotency-Key is still running (for up to a minute). |
429RATE_LIMITED | The 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/
Send only the fields to change.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
idstringRequiredThe machine’s ID.
1 to 64 characters.
Request body
namestring1 to 48 characters.
labelstringA 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 nullAt most 2,000 characters.
gymIdstring or nullAn ID of 12 letters and digits.
exerciseIdsarray of stringsAt 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_FOUND | No machine with that ID. |
422VALIDATION | The name is empty or over 48 characters. |
422VALIDATION | The body is empty: send at least one field. |
Errors any call can get: 400, 401, 403, 404, 413, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
400MALFORMED | The body is not valid JSON. |
413PAYLOAD_TOO_LARGE | The body is over 64 KiB. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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/
Revisions that already use it keep it, but a new revision cannot use it.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
idstringRequiredThe machine’s ID.
1 to 64 characters.
Response 200 · Archived (kept for history)
The same fields as Create a machine.
Errors
404NOT_FOUND | No machine with that ID. |
Errors any call can get: 401, 403, 404, 422, 429
401UNAUTHENTICATED | The key is missing, unknown, expired or revoked. |
403FORBIDDENinsufficient_scope | The key lacks the scope, or is a personal key. |
403FORBIDDENplan_required | When API keys need a plan and the organisation has none in good standing. |
404NOT_FOUND | The organisation is not the key’s own. |
403FORBIDDEN | The request came from a web page (it has an Origin header). Call the API from your server. |
422VALIDATION | A parameter or the body breaks the schema. |
429RATE_LIMITED | The 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();