curl -X PATCH "https://api.fitsociety.io/public/v1/clients/{clientId}/goals" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: <stable_request_key>" \
-H "Content-Type: application/json" \
-d '{
"nutritionGoals": {
"daily": {
"caloriesKcal": 2200,
"macroNutrients": {
"proteinGram": 160,
"carbohydratesGram": 250,
"fatGram": 70
}
},
"weekly": {
"enabled": true,
"monday": {
"caloriesKcal": 2400,
"macroNutrients": {
"proteinGram": 170,
"carbohydratesGram": 280,
"fatGram": 75
}
}
}
}
}'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
physicalActivityGoal: 'Lose Weight',
targetWeightKg: 78,
nutritionGoals: {
daily: {
caloriesKcal: 2200,
macroNutrients: {proteinGram: 160, carbohydratesGram: 250, fatGram: 70}
},
weekly: {
enabled: true,
monday: {
caloriesKcal: 2400,
macroNutrients: {proteinGram: 170, carbohydratesGram: 280, fatGram: 75}
}
}
}
})
};
fetch('https://api.fitsociety.io/public/v1/clients/{clientId}/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/clients/{clientId}/goals"
payload = {
"physicalActivityGoal": "Lose Weight",
"targetWeightKg": 78,
"nutritionGoals": {
"daily": {
"caloriesKcal": 2200,
"macroNutrients": {
"proteinGram": 160,
"carbohydratesGram": 250,
"fatGram": 70
}
},
"weekly": {
"enabled": True,
"monday": {
"caloriesKcal": 2400,
"macroNutrients": {
"proteinGram": 170,
"carbohydratesGram": 280,
"fatGram": 75
}
}
}
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"goals": {
"physicalActivityGoal": "string",
"currentWeightKg": 1,
"targetWeightKg": 1,
"timeline": {
"startDate": "2026-07-14T10:00:00.000Z",
"endDate": "2026-07-14T10:00:00.000Z"
},
"dailyGoals": {
"waterIntakeMl": 1,
"dailySteps": 1,
"sleepDurationHours": 1
},
"nutritionGoals": {
"daily": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"weekly": {
"enabled": true,
"monday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"tuesday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"wednesday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"thursday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"friday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"saturday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"sunday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
}
}
},
"measurementGoals": [
{
"typeId": "66f7b8b1e13c8d25f4d3d90a",
"typeName": "Example name",
"goal": 1,
"unit": "string"
}
]
},
"updatedFields": [
"string"
],
"updatedAt": "2026-07-14T10:00:00.000Z"
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
},
"idempotency": {
"replayed": false
}
}
}Update client goals
Requires goals:write. Accepts only public-safe activity, weight, timeline, water, steps, sleep, and daily or weekly nutrition target fields. Returned measurement goals use the same company and active-setting filters as GET /public/v1/clients//goals.
curl -X PATCH "https://api.fitsociety.io/public/v1/clients/{clientId}/goals" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: <stable_request_key>" \
-H "Content-Type: application/json" \
-d '{
"nutritionGoals": {
"daily": {
"caloriesKcal": 2200,
"macroNutrients": {
"proteinGram": 160,
"carbohydratesGram": 250,
"fatGram": 70
}
},
"weekly": {
"enabled": true,
"monday": {
"caloriesKcal": 2400,
"macroNutrients": {
"proteinGram": 170,
"carbohydratesGram": 280,
"fatGram": 75
}
}
}
}
}'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
physicalActivityGoal: 'Lose Weight',
targetWeightKg: 78,
nutritionGoals: {
daily: {
caloriesKcal: 2200,
macroNutrients: {proteinGram: 160, carbohydratesGram: 250, fatGram: 70}
},
weekly: {
enabled: true,
monday: {
caloriesKcal: 2400,
macroNutrients: {proteinGram: 170, carbohydratesGram: 280, fatGram: 75}
}
}
}
})
};
fetch('https://api.fitsociety.io/public/v1/clients/{clientId}/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/clients/{clientId}/goals"
payload = {
"physicalActivityGoal": "Lose Weight",
"targetWeightKg": 78,
"nutritionGoals": {
"daily": {
"caloriesKcal": 2200,
"macroNutrients": {
"proteinGram": 160,
"carbohydratesGram": 250,
"fatGram": 70
}
},
"weekly": {
"enabled": True,
"monday": {
"caloriesKcal": 2400,
"macroNutrients": {
"proteinGram": 170,
"carbohydratesGram": 280,
"fatGram": 75
}
}
}
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"goals": {
"physicalActivityGoal": "string",
"currentWeightKg": 1,
"targetWeightKg": 1,
"timeline": {
"startDate": "2026-07-14T10:00:00.000Z",
"endDate": "2026-07-14T10:00:00.000Z"
},
"dailyGoals": {
"waterIntakeMl": 1,
"dailySteps": 1,
"sleepDurationHours": 1
},
"nutritionGoals": {
"daily": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"weekly": {
"enabled": true,
"monday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"tuesday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"wednesday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"thursday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"friday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"saturday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
},
"sunday": {
"caloriesKcal": 1,
"macroNutrients": {
"carbohydratesPercent": 1,
"carbohydratesGram": 1,
"proteinPercent": 1,
"proteinGram": 1,
"fatPercent": 1,
"fatGram": 1
}
}
}
},
"measurementGoals": [
{
"typeId": "66f7b8b1e13c8d25f4d3d90a",
"typeName": "Example name",
"goal": 1,
"unit": "string"
}
]
},
"updatedFields": [
"string"
],
"updatedAt": "2026-07-14T10:00:00.000Z"
},
"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
"66f7b8b1e13c8d25f4d3d90a"