API reference
Customers
Linked customers: list them, read one with their assignments, change your note or their coach, unlink.
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.
Linked customers
GET/
By display name. Trainers see the customers they coach.
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.
coachIdstringOnly customers this member coaches.
An ID of 12 letters and digits.
Response 200 · Customers
itemsarray of objectsRequired7 fields in each item
idstringRequiredThe link’s ID: unique to your organisation, and new if the customer joins again.
displayNamestringRequiredlabelstringRequiredYour private note. The customer does not see it in the apps; it is part of their data download.
coachobject or nullRequiredA member of the organisation.
2 fields
userIdstringRequireddisplayNamestringRequired
shareResultsbooleanRequiredThe customer shares workouts on your programmes with you.
sinceintegerRequiredUnix time in seconds
activeAssignmentsintegerRequiredActive assignments.
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/customers \
-H "Authorization: Bearer wwo_your_key"const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/customers', {
headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();A customer, with their active assignments
GET/
Includes the customer’s active assignments and the weekdays of their schedule that use each one.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
customerIdstringRequiredThe customer’s ID in your organisation, from the customers list.
1 to 64 characters.
Response 200 · The customer
idstringRequiredThe link’s ID: unique to your organisation, and new if the customer joins again.
displayNamestringRequiredlabelstringRequiredYour private note. The customer does not see it in the apps; it is part of their data download.
coachobject or nullRequiredA member of the organisation.
2 fields
userIdstringRequireddisplayNamestringRequired
shareResultsbooleanRequiredThe customer shares workouts on your programmes with you.
sinceintegerRequiredUnix time in seconds
activeAssignmentsintegerRequiredActive assignments.
assignmentsarray of objectsRequired4 fields in each item
programmeIdstringRequirednamestringRequiredsinceintegerRequiredUnix time in seconds
weekdaysarray of integersRequiredISO weekdays (1 is Monday) of the customer’s schedule that use it.
Errors
404NOT_FOUND | No customer with that ID in the organisation. |
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/customers/customer_id \
-H "Authorization: Bearer wwo_your_key"const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/customers/customer_id', {
headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();Change your label for a customer, or their coach
PATCH/
Owners and admins choose the coach; the coach may change the label.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
customerIdstringRequiredThe customer’s ID in your organisation, from the customers list.
1 to 64 characters.
Request body
labelstringAt most 48 characters.
coachIdstring or nullA member, or null for no coach (owner and admin).
An ID of 12 letters and digits.
Any other field is refused with 422 VALIDATION.
Response 200 · Updated
idstringRequiredThe link’s ID: unique to your organisation, and new if the customer joins again.
displayNamestringRequiredlabelstringRequiredYour private note. The customer does not see it in the apps; it is part of their data download.
coachobject or nullRequiredA member of the organisation.
2 fields
userIdstringRequireddisplayNamestringRequired
shareResultsbooleanRequiredThe customer shares workouts on your programmes with you.
sinceintegerRequiredUnix time in seconds
activeAssignmentsintegerRequiredActive assignments.
Errors
404NOT_FOUND | No customer with that ID in the organisation. |
422VALIDATION | coachId is not a member (UNKNOWN_REFERENCE), or label is 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/customers/customer_id \
-H "Authorization: Bearer wwo_your_key" \
-H "Content-Type: application/json" \
-d '{ "label": "Morning group, Tuesdays", "coachId": "u6Fj1RkS8dMa" }'const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/customers/customer_id', {
method: 'PATCH',
headers: {
Authorization: 'Bearer wwo_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
label: 'Morning group, Tuesdays',
coachId: 'u6Fj1RkS8dMa',
}),
});
const data = await res.json();Unlink a customer
DELETE/
Their assignments end, and your programmes leave their weekly schedule and future days. They keep their workouts and copies.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
customerIdstringRequiredThe customer’s ID in your organisation, from the customers list.
1 to 64 characters.
Response 200 · Unlinked
okbooleanRequiredtrue
Errors
404NOT_FOUND | No customer with that ID in the organisation. |
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/customers/customer_id \
-H "Authorization: Bearer wwo_your_key"const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id/customers/customer_id', {
method: 'DELETE',
headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();