API reference
Organisation
The organisation an API key belongs to: its kind, name and counts.
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.
The organisation
GET/
Any API key of the organisation may call this, so it is a good first request.
Path parameters
orgIdstringRequiredThe organisation’s ID. A key works only on its own organisation.
1 to 64 characters.
Response 200 · With counts
idstringRequiredThe organisation’s ID.
kindstringRequiredgym: any number of trainers.solo: an independent trainer, one member.gymsolonamestringRequiredrolestring or nullRequiredYour role; null when an API key makes the call.
owneradmintrainercreatedAtintegerRequiredUnix time in seconds
countsobjectRequired4 fields
membersintegerRequiredcustomersintegerRequiredprogrammesintegerRequiredActive library programmes.
invitationsintegerRequiredPending invitations.
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 \
-H "Authorization: Bearer wwo_your_key"const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id', {
headers: { Authorization: 'Bearer wwo_your_key' },
});
const data = await res.json();