curl -X PATCH "https://api.fitsociety.io/public/v1/habit-templates/<templateId>" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: habit-template-update-20260826" \
-H "Content-Type: application/json" \
-d '{
"name": { "en": "Drink 2.5 liters of water" },
"goalValue": 2.5
}'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.fitsociety.io/public/v1/habit-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/habit-templates/{templateId}"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"template": {
"templateId": "66f7b8b1e13c8d25f4d3d90a",
"icon": "string",
"color": "string",
"name": {},
"defaultLanguage": "string",
"description": {},
"habitType": "string",
"goalPeriod": "string",
"logMode": "string",
"goalValue": 1,
"allowableValue": 1,
"unit": "string",
"customUnitName": {},
"taskDaysMode": "string",
"specificDaysOfWeek": [
"string"
],
"reminders": [
{
"enabled": true,
"time": "string",
"message": {}
}
],
"createdAt": "2026-07-14T10:00:00.000Z",
"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 standard habit template
Requires habits:write. Updates safe fields on a company-scoped standard habit template. Supplied text maps replace all translations for that field; omitted fields are retained. The first update of a legacy template requires defaultLanguage. Changing the default requires that language in every retained non-empty map. Already applied client habits are not changed.
curl -X PATCH "https://api.fitsociety.io/public/v1/habit-templates/<templateId>" \
-H "Authorization: Bearer <access_token>" \
-H "Idempotency-Key: habit-template-update-20260826" \
-H "Content-Type: application/json" \
-d '{
"name": { "en": "Drink 2.5 liters of water" },
"goalValue": 2.5
}'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.fitsociety.io/public/v1/habit-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/habit-templates/{templateId}"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"template": {
"templateId": "66f7b8b1e13c8d25f4d3d90a",
"icon": "string",
"color": "string",
"name": {},
"defaultLanguage": "string",
"description": {},
"habitType": "string",
"goalPeriod": "string",
"logMode": "string",
"goalValue": 1,
"allowableValue": 1,
"unit": "string",
"customUnitName": {},
"taskDaysMode": "string",
"specificDaysOfWeek": [
"string"
],
"reminders": [
{
"enabled": true,
"time": "string",
"message": {}
}
],
"createdAt": "2026-07-14T10:00:00.000Z",
"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"
Body
Up to 25 languages per field. Valid BCP 47 keys are canonicalized; duplicate canonical keys and und are rejected. Every non-empty map must contain defaultLanguage. Required text cannot be empty. A supplied map replaces all languages for that field; {} clears an optional field. Null maps, null values and plain strings are rejected.
Show child attributes
Show child attributes
Required on create and on the first public text update of an unlocalized resource. Omit on later PATCH requests to preserve it. Changing it requires the new language in all retained non-empty text maps. Declaring a legacy source language does not translate the source text.
80Up to 25 languages per field. Valid BCP 47 keys are canonicalized; duplicate canonical keys and und are rejected. Every non-empty map must contain defaultLanguage. Required text cannot be empty. A supplied map replaces all languages for that field; {} clears an optional field. Null maps, null values and plain strings are rejected.
Show child attributes
Show child attributes
build, quit day, week, month, value Up to 25 languages per field. Valid BCP 47 keys are canonicalized; duplicate canonical keys and und are rejected. Every non-empty map must contain defaultLanguage. Required text cannot be empty. A supplied map replaces all languages for that field; {} clears an optional field. Null maps, null values and plain strings are rejected.
Show child attributes
Show child attributes
everyday, weekdays, weekends, specific Show child attributes
Show child attributes