API reference
API reference
Every operation an API key can call: 51 of them, generated from the API’s OpenAPI contract when this site is built. Each lists the scopes that may call it, and the API enforces those same lists.
- Base URL
https://api.wristworkout.com; every path starts with the version,/v1. - Requests and responses are JSON. Send
Authorization: Bearerand your key on every request. - Times are Unix seconds, IDs are opaque strings, and loads are whole numbers in hundredths.
Organisation
The organisation an API key belongs to: its kind, name and counts. Organisation reference
- GET
/The organisationv1/ orgs/ {orgId}
Library
Library programmes with their revisions and the two flags, and the organisation’s own exercises and machines. Library reference
- GET
/Library programmesv1/ orgs/ {orgId}/ programmes - POST
/Create a library programmev1/ orgs/ {orgId}/ programmes - GET
/A library programme at its head revisionv1/ orgs/ {orgId}/ programmes/ {programmeId} - PUT
/Publish a new revisionv1/ orgs/ {orgId}/ programmes/ {programmeId} - PATCH
/Set “Customer can edit” and “Customer can make a copy”v1/ orgs/ {orgId}/ programmes/ {programmeId} - DELETE
/Archive a library programmev1/ orgs/ {orgId}/ programmes/ {programmeId} - GET
/A library programme at an earlier revisionv1/ orgs/ {orgId}/ programmes/ {programmeId}/ revisions/ {rev} - POST
/Duplicate a library programmev1/ orgs/ {orgId}/ programmes/ {programmeId}/ duplicate - GET
/The organisation’s exercises, with the built-in onesv1/ orgs/ {orgId}/ exercises - POST
/Create an exercisev1/ orgs/ {orgId}/ exercises - PATCH
/Change an exercisev1/ orgs/ {orgId}/ exercises/ {id} - DELETE
/Archive an exercisev1/ orgs/ {orgId}/ exercises/ {id} - GET
/The organisation’s machinesv1/ orgs/ {orgId}/ machines - POST
/Create a machinev1/ orgs/ {orgId}/ machines - PATCH
/Change a machinev1/ orgs/ {orgId}/ machines/ {id} - DELETE
/Archive a machinev1/ orgs/ {orgId}/ machines/ {id}
Assignments
Assign library programmes to customers with weekly slots, list assignments and unassign. Assignments reference
- GET
/Active assignmentsv1/ orgs/ {orgId}/ assignments - POST
/Assign a programme to customersv1/ orgs/ {orgId}/ assignments - DELETE
/Unassign a programme from a customerv1/ orgs/ {orgId}/ assignments/ {programmeId}/ {customerId}
Customers
Linked customers: list them, read one with their assignments, change your note or their coach, unlink. Customers reference
- GET
/Linked customersv1/ orgs/ {orgId}/ customers - GET
/A customer, with their active assignmentsv1/ orgs/ {orgId}/ customers/ {customerId} - PATCH
/Change your label for a customer, or their coachv1/ orgs/ {orgId}/ customers/ {customerId} - DELETE
/Unlink a customerv1/ orgs/ {orgId}/ customers/ {customerId}
Invitations
Create, list and revoke customer invitations. Each link works once and expires after 7 days. Invitations reference
- GET
/Pending invitationsv1/ orgs/ {orgId}/ invitations - POST
/Invite a customer, or a trainer to a gymv1/ orgs/ {orgId}/ invitations - DELETE
/Revoke a pending invitationv1/ orgs/ {orgId}/ invitations/ {invitationId}
Shared workouts
A customer’s workouts on your programmes, readable only while the customer shares them with you. Shared workouts reference
- GET
/A customer’s workouts on your programmesv1/ orgs/ {orgId}/ customers/ {customerId}/ sessions - GET
/One shared workout, station by stationv1/ orgs/ {orgId}/ customers/ {customerId}/ sessions/ {sessionId}
Webhook endpoints
Register webhook endpoints, send test events and read recent deliveries. Webhook endpoints reference
- GET
/Webhook endpointsv1/ orgs/ {orgId}/ webhooks - POST
/Add a webhook endpointv1/ orgs/ {orgId}/ webhooks - PATCH
/Change an endpoint, or turn it back onv1/ orgs/ {orgId}/ webhooks/ {endpointId} - DELETE
/Delete an endpointv1/ orgs/ {orgId}/ webhooks/ {endpointId} - POST
/Send a test eventv1/ orgs/ {orgId}/ webhooks/ {endpointId}/ test - GET
/Recent deliveries to an endpointv1/ orgs/ {orgId}/ webhooks/ {endpointId}/ deliveries
Your data
The read routes a personal key can call: your profile, coaching links, programmes, schedule and workouts. Your data reference
- GET
/Your profilev1/ me - GET
/Your gyms and trainers, and the programmes they assigned to youv1/ me/ coaching - GET
/Your exercises, with the built-in onesv1/ exercises - GET
/One exercisev1/ exercises/ {id} - PUT
/favouriteExercisev1/ exercises/ {id}/ favourite - DELETE
/unfavouriteExercisev1/ exercises/ {id}/ favourite - GET
/Your machinesv1/ machines - GET
/Your programmes, and those assigned to youv1/ programmes - GET
/A programme at its head revisionv1/ programmes/ {id} - GET
/A programme at an earlier revisionv1/ programmes/ {id}/ revisions/ {rev} - GET
/Programme templatesv1/ templates - GET
/Your weekly schedule and changed daysv1/ schedule - GET
/Today and the next 7 daysv1/ today - GET
/Your workouts, newest firstv1/ sessions - GET
/One workout, station by stationv1/ sessions/ {id} - GET
/Progress on one exercisev1/ exercises/ {id}/ progress