curl -X POST "https://api.fitsociety.io/public/v1/workout/performance/sessions/{sessionId}/performances/{performanceId}/swap" \
-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({newExerciseId: '67f1234567890abcdef1234'})
};
fetch('https://api.fitsociety.io/public/v1/workout/performance/sessions/{sessionId}/performances/{performanceId}/swap', 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/performance/sessions/{sessionId}/performances/{performanceId}/swap"
payload = { "newExerciseId": "67f1234567890abcdef1234" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Swap a specific logged performance's exercise (by performance id)
Swaps the exercise of one specific logged performance, targeted by its own performance document id. Unlike the /exercises/{exerciseIdToReplace}/replace endpoint (which keys on the catalog exerciseId), this resolves exactly one row even when the same exercise appears more than once in the session. The swapped-in exercise starts clean — the original’s logged sets are NOT carried over (the new performance gets blank set rows from the plan template when plan-linked, otherwise none); the original is then soft-deleted.
Requires the workout_sessions:write scope and the corresponding Workout features and permissions.
curl -X POST "https://api.fitsociety.io/public/v1/workout/performance/sessions/{sessionId}/performances/{performanceId}/swap" \
-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({newExerciseId: '67f1234567890abcdef1234'})
};
fetch('https://api.fitsociety.io/public/v1/workout/performance/sessions/{sessionId}/performances/{performanceId}/swap', 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/performance/sessions/{sessionId}/performances/{performanceId}/swap"
payload = { "newExerciseId": "67f1234567890abcdef1234" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)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"