Activate or deactivate a user
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/switch-client/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"avoid_send_welcome": true
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/switch-client/"
payload = {
"active": True,
"avoid_send_welcome": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: true, avoid_send_welcome: true})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/switch-client/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "Action completed successfully"
}{
"active": [
"The user does not have any active module, please assign one before activating it."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Users
Activate or deactivate a user
active: true creates a membership and makes the user a client again (the user must
have an active module); a WhatsApp welcome message is sent unless avoid_send_welcome
is true. active: false marks the user as non-client and expires all memberships.
POST
/
clients
/
users
/
{user_id}
/
switch-client
/
Activate or deactivate a user
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/switch-client/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"avoid_send_welcome": true
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/switch-client/"
payload = {
"active": True,
"avoid_send_welcome": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: true, avoid_send_welcome: true})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/switch-client/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "Action completed successfully"
}{
"active": [
"The user does not have any active module, please assign one before activating it."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Authorizations
Path Parameters
Body
application/json

