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": 1,
"totalItems": 1,
"totalAvailableItems": 1,
"totalPages": 1,
"hasNextPage": true,
"hasPreviousPage": true,
"nextPage": 1,
"previousPage": 1
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Get workout library home
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.
Read collections default to 10 records. limit accepts 1 through 100; larger values use 100. Continue with page using the returned pagination metadata. Shared or mixed catalogue browsing supports pages 1 through 10. Own-record and explicit company-only scopes have no page ceiling. pagination.totalItems describes the accessible browse window; pagination.totalAvailableItems gives the full matching count for bounded catalogues.
Requires the workout_client_plans:write scope and the corresponding Workout features and permissions.
The clientId path parameter identifies a client in the company bound to the Public API token.
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": 1,
"totalItems": 1,
"totalAvailableItems": 1,
"totalPages": 1,
"hasNextPage": true,
"hasPreviousPage": true,
"nextPage": 1,
"previousPage": 1
}
},
"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"