Skip to content
Developer docsCustomers

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

By display name. Trainers see the customers they coach.

Key
Organisation key, wwo_
Scope
customers: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.

coachIdstring

Only customers this member coaches.

An ID of 12 letters and digits.

Response 200 · Customers

itemsarray of objectsRequired
7 fields in each item
idstringRequired

The link’s ID: unique to your organisation, and new if the customer joins again.

displayNamestringRequired
labelstringRequired

Your private note. The customer does not see it in the apps; it is part of their data download.

coachobject or nullRequired

A member of the organisation.

2 fields
userIdstringRequired
displayNamestringRequired
shareResultsbooleanRequired

The customer shares workouts on your programmes with you.

sinceintegerRequired

Unix time in seconds

activeAssignmentsintegerRequired

Active assignments.

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

Includes the customer’s active assignments and the weekdays of their schedule that use each one.

Key
Organisation key, wwo_
Scope
customers: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.

customerIdstringRequired

The customer’s ID in your organisation, from the customers list.

1 to 64 characters.

Response 200 · The customer

idstringRequired

The link’s ID: unique to your organisation, and new if the customer joins again.

displayNamestringRequired
labelstringRequired

Your private note. The customer does not see it in the apps; it is part of their data download.

coachobject or nullRequired

A member of the organisation.

2 fields
userIdstringRequired
displayNamestringRequired
shareResultsbooleanRequired

The customer shares workouts on your programmes with you.

sinceintegerRequired

Unix time in seconds

activeAssignmentsintegerRequired

Active assignments.

assignmentsarray of objectsRequired
4 fields in each item
programmeIdstringRequired
namestringRequired
sinceintegerRequired

Unix time in seconds

weekdaysarray of integersRequired

ISO weekdays (1 is Monday) of the customer’s schedule that use it.

Errors

404NOT_FOUNDNo customer with that ID in the organisation.
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/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/v1/orgs/{orgId}/customers/{customerId}

Owners and admins choose the coach; the coach may change the label.

Key
Organisation key, wwo_
Scope
customers: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.

customerIdstringRequired

The customer’s ID in your organisation, from the customers list.

1 to 64 characters.

Request body

labelstring

At most 48 characters.

coachIdstring or null

A 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

idstringRequired

The link’s ID: unique to your organisation, and new if the customer joins again.

displayNamestringRequired
labelstringRequired

Your private note. The customer does not see it in the apps; it is part of their data download.

coachobject or nullRequired

A member of the organisation.

2 fields
userIdstringRequired
displayNamestringRequired
shareResultsbooleanRequired

The customer shares workouts on your programmes with you.

sinceintegerRequired

Unix time in seconds

activeAssignmentsintegerRequired

Active assignments.

Errors

404NOT_FOUNDNo customer with that ID in the organisation.
422VALIDATIONcoachId is not a member (UNKNOWN_REFERENCE), or label is 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/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/v1/orgs/{orgId}/customers/{customerId}

Their assignments end, and your programmes leave their weekly schedule and future days. They keep their workouts and copies.

Key
Organisation key, wwo_
Scope
customers: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.

customerIdstringRequired

The customer’s ID in your organisation, from the customers list.

1 to 64 characters.

Response 200 · Unlinked

okbooleanRequired

Valuetrue

Errors

404NOT_FOUNDNo customer with that ID in the organisation.
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/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();