Skip to content
Developer docsOrganisation

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/v1/orgs/{orgId}

Any API key of the organisation may call this, so it is a good first request.

Key
Organisation key, wwo_
Scopes
Any key of the organisation
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.

Response 200 · With counts

idstringRequired

The organisation’s ID.

kindstringRequired

gym: any number of trainers. solo: an independent trainer, one member.

One ofgymsolo

namestringRequired
rolestring or nullRequired

Your role; null when an API key makes the call.

One ofowneradmintrainer

createdAtintegerRequired

Unix time in seconds

countsobjectRequired
4 fields
membersintegerRequired
customersintegerRequired
programmesintegerRequired

Active library programmes.

invitationsintegerRequired

Pending invitations.

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 \
  -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();