curl -X POST 'https://api.fitsociety.io/public/v1/workout/plans/create-and-assign/66f7b8b1e13c8d25f4d3d90c' \
-H 'Authorization: Bearer <access_token>' \
-H 'Idempotency-Key: public-v1-workout-plans-create-and-assign-clientId-001' \
-H 'Content-Type: application/json' \
-d '{"name":[{"lang":"en","value":"Strength programme"}],"description":[{"lang":"en","value":"Progressive strength training."}],"category":"Strength","visibility":"Company","schedule":{"mode":"recurring","releasePolicy":"all_at_once","startDate":""},"useDefaultExerciseSettings":true,"defaultExerciseValues":{"sets":3,"reps":"8-12","rest":90,"weight":0,"repTempo":"3010","duration":0}}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: [{lang: 'en', value: 'Strength programme'}], visibility: 'Company'})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/create-and-assign/{clientId}', 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/create-and-assign/{clientId}"
payload = {
"name": [
{
"lang": "en",
"value": "Strength programme"
}
],
"visibility": "Company"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Create a workout plan assigned to one client
Creates an assigned plan directly for the target client without a library template. The server sets templateType=Assigned, clientId from the path and sourceTemplateId=null. Client tokens can create only for themselves. Accepts application/json or multipart/form-data; send structured multipart fields as JSON strings. Description is optional. Supply visibility and either valid defaultExerciseValues or useDefaultExerciseSettings=false. The response planId is used to add days with POST /app/v1/workout/plans/moments/, then add exercises with POST /app/v1/workout/plans/moments/exercises//. Per-set prescriptions, rest and tempo belong to those exercise requests; supersets use the separate plan-moment superset operations. This request does not create nested workout days or exercises. Coaches must supply scheduleStartDate or schedule.startDate for multi_week or calendar_week schedules. A recurring calendar_week start must be a company-local Monday. Create workout days first, then reference their returned IDs with PUT /app/v1/workout/plans//calendar-schedule. Calendar-week definitions cannot reference days that do not yet exist. Programme calendar features remain gated by company settings.
Requires the workout_plans:write scope. This operation maps to /app/v1/workout/plans/create-and-assign/:clientId and retains its Workout V2 permission, feature-flag, and resource-scope checks.
The clientId path parameter is resolved inside the company bound to the Public API token when present.
curl -X POST 'https://api.fitsociety.io/public/v1/workout/plans/create-and-assign/66f7b8b1e13c8d25f4d3d90c' \
-H 'Authorization: Bearer <access_token>' \
-H 'Idempotency-Key: public-v1-workout-plans-create-and-assign-clientId-001' \
-H 'Content-Type: application/json' \
-d '{"name":[{"lang":"en","value":"Strength programme"}],"description":[{"lang":"en","value":"Progressive strength training."}],"category":"Strength","visibility":"Company","schedule":{"mode":"recurring","releasePolicy":"all_at_once","startDate":""},"useDefaultExerciseSettings":true,"defaultExerciseValues":{"sets":3,"reps":"8-12","rest":90,"weight":0,"repTempo":"3010","duration":0}}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: [{lang: 'en', value: 'Strength programme'}], visibility: 'Company'})
};
fetch('https://api.fitsociety.io/public/v1/workout/plans/create-and-assign/{clientId}', 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/create-and-assign/{clientId}"
payload = {
"name": [
{
"lang": "en",
"value": "Strength programme"
}
],
"visibility": "Company"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Public API access token issued by /public/v1/oauth/token. Example: Authorization: Bearer fspt_.... Each resource request rechecks the token company's current provider access. Disabling access blocks existing tokens with 403 auth.provider_unavailable.
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"
Path Parameters
Client receiving the assigned plan.
"67f1234567890abcdef1234"
Body
Plan metadata and exercise defaults. Description is optional. Supply defaultExerciseValues unless useDefaultExerciseSettings is false; when disabled, omit the defaults or send null. Create workout days and their exercises through the separate moment/exercise endpoints after receiving planId.
1Show child attributes
Show child attributes
[ { "lang": "en", "value": "Full Body Strength" }, { "lang": "nl", "value": "Full Body Kracht" } ]
Everyone, Company, Fitsociety "Company"
1Show child attributes
Show child attributes
[ { "lang": "en", "value": "Full Body Strength" }, { "lang": "nl", "value": "Full Body Kracht" } ]
Agility & Speed, Strength, Hypertrophy, Strength - Dynamic, Strength - Explosive, Strength - Static, Cardio, Cardio - Duration, Cardio - Interval, HIIT, Crossfit, Mobility, Stretching, Core, Coordination & Balance, Movement Prep, Functional Training, Recovery, Sports, Martial Arts, Yoga, Other, GROUP_WORKOUT_TEMPLATE, Plyometric, Cycling, Cardio - interval, Mobilisation, Stabilisation, Daily Living, Target zone, Respiration, Breathing, Massage, Outdoor sports, Indoor sports, Dance, Group Lessons, Martial arts, Material Arts, Fight skills, Mind and body, , default "Strength"
Weight Loss, Hypertrophy, Endurance, Flexibility, General Fitness, Strength "Strength"
Linear, Non-Linear, Block, Undulating, None "Linear"
Beginner, Intermediate, Advanced "Intermediate"
Low, Medium, High "Medium"
Assigned plans default to Active; Draft is not supported.
Active, Inactive Show child attributes
Show child attributes
Initial assigned schedule. Supply startDate here or through scheduleStartDate for multi_week or calendar_week. New plans have no workout days to reference; populate their workout calendar after creating the days.
Show child attributes
Show child attributes
Whether new exercises use the plan-level defaults. When false, defaultExerciseValues must be null.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Optional alias for schedule.startDate, taking precedence when supplied. Coaches must provide a start date for multi_week or calendar_week schedules. A recurring calendar_week schedule requires a company-local Monday.
^\d{4}-\d{2}-\d{2}$"2026-09-08"
Optional opaque resource reference owned by the authenticated API client and company. Available only for application/json creation without file uploads. Trimmed, nonempty and at most 200 characters; control characters are rejected. Repeating the reference with the same creation content returns the existing resource; conflicting content returns 409.
1 - 200^[^\u0000-\u001F\u007F]+$"programme-v1"