Update user activity
Sets a user’s active status immediately or schedules activation/deactivation dates. Provide isActive to change status now (clears scheduled dates), or provide one or both of setActiveOn / setInactiveOn to schedule changes. Omitting a scheduled date field leaves the existing value unchanged.
PATCH
/users/{id}/activityPath parameters
idstringrequiredRequest body
requiredapplication/jsonisActivebooleansetActiveOnstring<date-time>setInactiveOnstring<date-time>Responses
200Updated activity status
dataUserActivityStatusrequiredShow propertiesHide properties
isActivebooleanrequiredisActiveFromstring<date-time> | nullrequiredisActiveUntilstring<date-time> | nullrequiredmetaResponseMetarequiredShow propertiesHide properties
requestIdstringrequiredtimestampstring<date-time>requiredversionstringrequiredAllowed:
v4400Bad Request
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring401Unauthorized
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring404Not Found
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring429Too Many Requests
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring500Internal Server Error
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestringRequest
curl -X PATCH "https://fuxam.app/api/v4/users/string/activity" \
-H "Content-Type: application/json" \
-d '{
"isActive": true,
"setActiveOn": "2024-01-01T00:00:00Z",
"setInactiveOn": "2024-01-01T00:00:00Z"
}'const response = await fetch("https://fuxam.app/api/v4/users/string/activity", {
method: "PATCH",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"isActive": true,
"setActiveOn": "2024-01-01T00:00:00Z",
"setInactiveOn": "2024-01-01T00:00:00Z"
})
});import requests
response = requests.patch(
"https://fuxam.app/api/v4/users/string/activity",
headers={
"Content-Type": "application/json"
},
json={
"isActive": True,
"setActiveOn": "2024-01-01T00:00:00Z",
"setInactiveOn": "2024-01-01T00:00:00Z"
},
)Response
{
"data": {
"isActive": true,
"isActiveFrom": "2026-01-01T00:00:00.000Z",
"isActiveUntil": "2024-01-01T00:00:00Z"
},
"meta": {
"requestId": "req_1234567890_abc",
"timestamp": "2026-06-02T07:00:00.000Z",
"version": "v4"
}
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}