curl -X POST "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/library" \
-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({
page: 1,
limit: 10,
favourites: false,
muscleGroups: ['Quadriceps', 'Chest'],
equipments: ['barbell'],
categories: ['Strength'],
levels: ['Beginner'],
coaches: [],
search: ''
})
};
fetch('https://api.fitsociety.io/public/v1/workout/clients/{clientId}/library', 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/clients/{clientId}/library"
payload = {
"page": 1,
"limit": 10,
"favourites": False,
"muscleGroups": ["Quadriceps", "Chest"],
"equipments": ["barbell"],
"categories": ["Strength"],
"levels": ["Beginner"],
"coaches": [],
"search": ""
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"isFilterApplied": false,
"categories": [
{
"_id": "67f1234567890abcdef1234",
"name": "Strength Programs",
"templates": [
{
"_id": "67f1234567890abcdef1234",
"name": "4-Day Strength Block",
"description": "Progressive upper/lower split.",
"thumbnail": "https://cdn.example.com/workouts/plan-cover.jpg",
"difficulty": "Intermediate",
"intensity": "High",
"category": "Strength",
"scheduleMode": "recurring"
}
],
"totalTemplates": 12
}
],
"filteredData": [
{
"_id": "67f1234567890abcdef1234",
"name": "4-Day Strength Block",
"description": "Progressive upper/lower split.",
"thumbnail": "https://cdn.example.com/workouts/plan-cover.jpg",
"difficulty": "Intermediate",
"intensity": "High",
"category": "Strength",
"scheduleMode": "recurring"
}
],
"availableFilters": {
"favourites": [
true,
false
],
"muscleGroups": [
"Quadriceps",
"Hamstrings",
"Chest"
],
"equipments": [
{
"value": "barbell",
"label": "Barbell"
}
],
"categories": [
"Strength",
"Cardio",
"Flexibility"
],
"levels": [
"Beginner",
"Intermediate",
"Advance"
],
"coaches": [
{
"id": "67f1234567890abcdef1234",
"name": "Alex Jansen",
"image": "https://cdn.example.com/coaches/alex.jpg"
}
]
},
"selectedFilters": {
"favourites": false,
"muscleGroups": [],
"equipments": [],
"categories": [],
"levels": [],
"coaches": [],
"search": ""
},
"pagination": {
"page": 1,
"limit": 20,
"totalItems": 5,
"totalPages": 1
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Get workout library home
Client-only. Accepts filters in the request body. When no filters are active (isFilterApplied: false) returns grouped categories, each with up to 5 template cards, paginated by category count. When any filter is active (isFilterApplied: true) returns a flat paginated filteredData list — categories is empty in that case. availableFilters.coaches is dynamically populated from coaches who have created active templates for this company.
Requires the workout_client_plans:write scope. This operation maps to /app/v1/workout/client/library and retains its Workout V2 permission, feature-flag, and resource-scope checks.
The clientId path parameter identifies the client represented by the request context.
curl -X POST "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/library" \
-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({
page: 1,
limit: 10,
favourites: false,
muscleGroups: ['Quadriceps', 'Chest'],
equipments: ['barbell'],
categories: ['Strength'],
levels: ['Beginner'],
coaches: [],
search: ''
})
};
fetch('https://api.fitsociety.io/public/v1/workout/clients/{clientId}/library', 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/clients/{clientId}/library"
payload = {
"page": 1,
"limit": 10,
"favourites": False,
"muscleGroups": ["Quadriceps", "Chest"],
"equipments": ["barbell"],
"categories": ["Strength"],
"levels": ["Beginner"],
"coaches": [],
"search": ""
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"isFilterApplied": false,
"categories": [
{
"_id": "67f1234567890abcdef1234",
"name": "Strength Programs",
"templates": [
{
"_id": "67f1234567890abcdef1234",
"name": "4-Day Strength Block",
"description": "Progressive upper/lower split.",
"thumbnail": "https://cdn.example.com/workouts/plan-cover.jpg",
"difficulty": "Intermediate",
"intensity": "High",
"category": "Strength",
"scheduleMode": "recurring"
}
],
"totalTemplates": 12
}
],
"filteredData": [
{
"_id": "67f1234567890abcdef1234",
"name": "4-Day Strength Block",
"description": "Progressive upper/lower split.",
"thumbnail": "https://cdn.example.com/workouts/plan-cover.jpg",
"difficulty": "Intermediate",
"intensity": "High",
"category": "Strength",
"scheduleMode": "recurring"
}
],
"availableFilters": {
"favourites": [
true,
false
],
"muscleGroups": [
"Quadriceps",
"Hamstrings",
"Chest"
],
"equipments": [
{
"value": "barbell",
"label": "Barbell"
}
],
"categories": [
"Strength",
"Cardio",
"Flexibility"
],
"levels": [
"Beginner",
"Intermediate",
"Advance"
],
"coaches": [
{
"id": "67f1234567890abcdef1234",
"name": "Alex Jansen",
"image": "https://cdn.example.com/coaches/alex.jpg"
}
]
},
"selectedFilters": {
"favourites": false,
"muscleGroups": [],
"equipments": [],
"categories": [],
"levels": [],
"coaches": [],
"search": ""
},
"pagination": {
"page": 1,
"limit": 20,
"totalItems": 5,
"totalPages": 1
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}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 in the company bound to the Public API token.
^[a-fA-F0-9]{24}$Body
x >= 11
1 <= x <= 10010
true to restrict to the client's favourited templates.
false
Filter by templates containing exercises targeting these muscle groups.
["Quadriceps", "Chest"]
Filter by templates containing exercises using this equipment (equipment key values).
["barbell"]
Filter by workout category.
["Strength"]
Filter by difficulty level.
Beginner, Intermediate, Advance ["Beginner"]
Filter by template creator coach IDs.
[]
Case-insensitive search on template name.
""