curl -X POST "https://api.fitsociety.io/public/v1/workout/plans/assign-multiple" \
-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',
clientIds: ['67f1234567890abcdef9999', '67f1234567890abcdef8888']
})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign-multiple', 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"
payload = {
"templatePlanId": "67f1234567890abcdef1234",
"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){
"data": {
"templatePlanId": "67f1234567890abcdef1234",
"requested": 2,
"assignedCount": 2,
"failedCount": 0,
"assigned": [
{
"clientId": "67f1234567890abcdef1234",
"planId": "67f1234567890abcdef1234"
}
],
"failed": [
{
"clientId": "67f1234567890abcdef1234",
"error": "ASSIGN_FAILED"
}
]
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Assign a template workout plan to multiple clients at once
Assigns one template plan to many clients in a single call. Each client receives an independent Assigned copy (templateType: "Assigned", sourceTemplateId = template). Duplicate assignments are allowed and the plan name is suffixed per client (#2, #3, …). Each client is created independently, so the response reports per-client assigned[] and failed[] outcomes; a partial success still returns 200.
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" \
-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',
clientIds: ['67f1234567890abcdef9999', '67f1234567890abcdef8888']
})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/assign-multiple', 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"
payload = {
"templatePlanId": "67f1234567890abcdef1234",
"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){
"data": {
"templatePlanId": "67f1234567890abcdef1234",
"requested": 2,
"assignedCount": 2,
"failedCount": 0,
"assigned": [
{
"clientId": "67f1234567890abcdef1234",
"planId": "67f1234567890abcdef1234"
}
],
"failed": [
{
"clientId": "67f1234567890abcdef1234",
"error": "ASSIGN_FAILED"
}
]
},
"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 when the template uses multi_week or calendar_week; one date applies to every selected client, so every client gets the same treatment.
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 (anything else → 400 WORKOUTPLAN_SCHEDULE_INVALID); a sequence recurring template ignores the date.
^\d{4}-\d{2}-\d{2}$"2026-09-07"