Enable or disable a user

put

/api/REST/2.0/system/user/{id}/enabled

Enables or disables the user's account specified by the id parameter. Users without the "ManageUsers" action permission can only enable or disable their own account.

Request

Supported Media Types
Path Parameters
Body ()
The request body defines whether to enable or disable the user with the specified ID
Root Schema : UserEnabled
Type: object
Title: UserEnabled
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : UserEnabled
Type: object
Title: UserEnabled
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Enable the user's account with the user ID #5:


PUT /api/REST/2.0/system/user/5/enabled
Content-Type: application/json 
			

Request body:


{
  "enabled": true
}
			

Response:


{
  "type": "UserEnabled",
  "enabled": "True"
}
			

Disable the user's account with the user ID #5:


PUT /api/REST/2.0/system/user/5/enabled
Content-Type: application/json 
			

Request body:


{
  "enabled": false
}
			

Response:


{
  "type": "UserEnabled",
  "enabled": "False"
}
			
Back to Top