Can't 'Disable' User

It seems that this has stopped working Disable User and was replaced with Delete User. I am having a problem using the “user delete” because users may have open issues, or issues that created or are assigned. I am now trying to figure out how to deactivate a user by flipping the “Has access on site” toggle.
I know that removing users from “Confluence-users” deactivates the confluence access, but I am unable to find the aformentioned “Has access on site”.

Can anyone please help me with how to accomplish this?

I think I need a way, through the API, to mark a user as inactive on the “Managed Accounts” page.

Very often I have a user that I want to disable but I do not want to delete the user because we have a policy to keep the user disabled for 3 months and then delete the user.

The user is usually part of multiple groups and usually it has a confluence and JIRA Software license, sometimes also the Service desk license.

I just want to flip the switch “Has access on site” via API because the command is part of my off-boarding application.

Any ideas how to set the Active field to False by using PUT and this uri ?

I tried:
$url = “
$headers = @
{“Authorization” = “Basic xxx”}
$Body = @{
active = “False”
Invoke-RestMethod -Method PUT -Uri $url -Headers $headers -Body $Body

It gave me the error:
The remote server returned an error: (405) Method Not Allowed.

This is a definite problem. The rest API endpoint is saying a PUT method is not allowed.