curl -X POST "https://api.fitsociety.io/public/v1/workout/plans/assign-multiple-plans" \
-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({
templatePlanIds: ['67f1234567890abcdef1111', '67f1234567890abcdef2222'],
clientIds: ['67f1234567890abcdef9999', '67f1234567890abcdef8888']
})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign-multiple-plans', 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-multiple-plans"
payload = {
"templatePlanIds": ["67f1234567890abcdef1111", "67f1234567890abcdef2222"],
"clientIds": ["67f1234567890abcdef9999", "67f1234567890abcdef8888"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Assign multiple workout templates to multiple clients
Creates the template/client cross product. scheduleStartDate is required when any selected template uses multi_week or calendar_week, and is validated for every resolved template before copies are created. One canonical date is applied to every selected client. A multi_week + calendar_week template accepts any weekday (the anchor snaps back to that week’s Monday and week 1’s earlier days become rest days); a calendar_week recurring template still requires a company-local Monday; sequence recurring templates ignore the date.
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-multiple-plans" \
-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({
templatePlanIds: ['67f1234567890abcdef1111', '67f1234567890abcdef2222'],
clientIds: ['67f1234567890abcdef9999', '67f1234567890abcdef8888']
})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign-multiple-plans', 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-multiple-plans"
payload = {
"templatePlanIds": ["67f1234567890abcdef1111", "67f1234567890abcdef2222"],
"clientIds": ["67f1234567890abcdef9999", "67f1234567890abcdef8888"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)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 when any selected template uses multi_week or calendar_week. The SAME date applies to every selected plan/client pair, and each template interprets it by its own mode.
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, and week 1's lead-in work is DROPPED rather than deferred.
Recurring templates are unchanged. A calendar_week recurring template still requires a canonical company-local Monday; a sequence recurring template ignores the date. In a MIXED batch this is validated up front for every resolved template, so a mid-week date sent alongside a recurring calendar template fails the WHOLE request with 400 WORKOUTPLAN_SCHEDULE_INVALID and nothing is assigned.
^\d{4}-\d{2}-\d{2}$"2026-09-07"