Developer documentation
Getting started
From nothing to a first successful request: an organisation, an API key, and a call to GET /v1/orgs/{orgId}.
1. Create an organisation
Sign in to the portal at app.wristworkout.com and create a gym, or start as an independent trainer. Whoever creates it becomes its owner. A gym can have up to 100 members, trainers included. An independent trainer’s organisation has one member, and its owner can turn it into a gym later without losing its library, customers or keys.
To try the API before it reaches your customers, start with a test organisation.
2. Create an API key
The owner or an admin creates organisation keys in the portal: open the organisation, then Developers. A gym’s keys count against the gym’s own plan, and an independent trainer’s against the plan covering its owner.
- Give the key a name you will recognise, such as
Booking system. - Choose its scopes: only what the integration needs. Authentication and keys lists them.
- Choose when it expires, from 30 to 365 days, or never.
The key is shown once. Put it in your server’s secret store straight away: Wrist Workout keeps only a hash of it and cannot show it again.
3. Send your first request
Your organisation’s ID is in the portal’s address while you work in it: app.wristworkout.com/o/<orgId>/…. Any key of the organisation may call GET /v1/orgs/{orgId}, whatever its scopes, so it makes a good first request.
export WW_API_KEY=wwo_your_key
curl https://api.wristworkout.com/v1/orgs/org_id \
-H "Authorization: Bearer $WW_API_KEY"// Node 20 or later, Deno, Bun or Cloudflare Workers.
// The key comes from the environment, never from the code.
const res = await fetch('https://api.wristworkout.com/v1/orgs/org_id', {
headers: { Authorization: `Bearer ${process.env.WW_API_KEY}` },
});
if (!res.ok) throw new Error(`Wrist Workout API: ${res.status}`);
const org = await res.json();
console.log(org.name, org.counts);4. Read the response
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
RateLimit-Policy: "key";q=100;w=60
RateLimit: "key";a=99;w=60
X-Request-Id: 3d0c6f9e-2b7a-4d15-9c8e-51f4a0b7e2d6
{
"id": "q3Hn8VbT2kLm",
"kind": "gym",
"name": "Iron Gym",
"role": null,
"createdAt": 1789373550,
"counts": {
"members": 4,
"customers": 128,
"programmes": 18,
"invitations": 3
}
}roleis null because a key made the call, not a person.- The
RateLimitheaders say how many requests the key has left in the current minute. Rate limits explains them. X-Request-Ididentifies this request. Log it with the status and any error code, so you can trace a failure in your own records.
Test on an organisation of your own
Wrist Workout has one environment, and every request works on real data. To try an integration without touching your customers, give it an organisation of its own:
- Create a second organisation in the portal, such as an independent trainer named
Test. A person can own up to 5 organisations. - Open it, create a key under Developers, and send your requests with its ID. An independent trainer’s keys and library programmes count with your own, against the best plan covering you: your own, or a seat at your organisation. It needs to be one that allows keys (whose plan counts).
- Webhooks need the test organisation’s own plan. Without one, its endpoints stay paused, so check your receiver against the example message in verify the signature instead.
- Join it as a customer: create a customer invitation and open its link while you are signed in. What you assign then reaches your own Today, programme list and watch, as it would a customer’s. Weekdays you set replace your own on those days, so use a second account if you train with Wrist Workout yourself.
- When you are done, cancel any plan it has on its Plan page, then delete it under Settings. Its keys stop working, its webhook endpoints are turned off, and its customer links end.
If it does not work
| Status | Code | What to check |
|---|---|---|
| 401 | UNAUTHENTICATED | The header is Authorization: Bearer and the key, and the key is not revoked or expired. |
| 403 | FORBIDDEN, reason insufficient_scope | A personal key on an organisation route, or a key without the scope the operation needs. |
| 403 | FORBIDDEN, no reason | The request came from a browser: the API refuses requests that carry an Origin header. |
| 404 | NOT_FOUND | The organisation ID is not the key’s own organisation. |
Next
- Assign a programme to customers, with days on their weekly schedule.
- Receive webhooks when something changes.
- Look up any operation in the API reference.