curl -X POST "https://api.fitsociety.io/public/v1/workout/plans/assign" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: <stable_request_key>" \
-H "Content-Type: application/json" \
-d '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({templatePlanId: '67f1234567890abcdef1234', clientId: '67f1234567890abcdef1234'})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/workout/plans/assign"
payload = {
"templatePlanId": "67f1234567890abcdef1234",
"clientId": "67f1234567890abcdef1234"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"planId": "67f1234567890abcdef1234",
"templatePlanId": "67f1234567890abcdef1234",
"clientId": "67f1234567890abcdef1234"
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Assign a template workout plan to a client
Requires the workout_plans:write scope and the corresponding Workout features and permissions.
curl -X POST "https://api.fitsociety.io/public/v1/workout/plans/assign" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: <stable_request_key>" \
-H "Content-Type: application/json" \
-d '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({templatePlanId: '67f1234567890abcdef1234', clientId: '67f1234567890abcdef1234'})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/workout/plans/assign"
payload = {
"templatePlanId": "67f1234567890abcdef1234",
"clientId": "67f1234567890abcdef1234"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"planId": "67f1234567890abcdef1234",
"templatePlanId": "67f1234567890abcdef1234",
"clientId": "67f1234567890abcdef1234"
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Authorizations
Headers
Required for Public API write requests. Reusing the same key with the same method, path, and body replays the stored successful response; reusing it with a different request returns 409 idempotency.conflict.
1 - 200"booking-create-20260714-001"
Body
Keep each assigned copy hidden and unavailable to the client until midnight on scheduleStartDate in the company timezone. Requires a valid scheduleStartDate, including for ordinary recurring plans. Stored release time is UTC; a calendar programme's Monday anchor does not move this release date. Coaches retain access. Inactive remains Inactive. Future assignments do not send an immediate assignment notification. Existing assignments are unchanged.
Sets week 1 of the programme. Required for coach assignments when the template uses multi_week or calendar_week.
A multi_week + calendar_week template accepts ANY weekday. A mid-week date is absorbed into week 1: the stored schedule.startDate snaps back to that week's Monday, and week 1's days BEFORE the chosen weekday become rest days. Weeks 2..n land exactly where authored. Week 1's lead-in work is therefore DROPPED, not deferred — a Friday start on a Mon/Wed/Fri plan gives that client one session in week 1 instead of three, and a Sunday start rests week 1 almost entirely.
Recurring templates are unchanged. A calendar_week recurring template still requires a canonical company-local Monday (anything else → 400 WORKOUTPLAN_SCHEDULE_INVALID), because it repeats week 1 forever and resting out its lead-in would drop that work from every future cycle. A sequence recurring template ignores the date entirely.
Clients that self-assign may omit it and use the company-local current date or Monday.
^\d{4}-\d{2}-\d{2}$"2026-09-07"