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
  • Whether or not the user's account is enabled or disabled. Set {\"enabled\":true} to enable a user, otherwise {\"enabled\":false}.
  • The asset's type in Eloqua. This is a read-only property.
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : UserEnabled
Type: object
Title: UserEnabled
Show Source
  • Whether or not the user's account is enabled or disabled. Set {\"enabled\":true} to enable a user, otherwise {\"enabled\":false}.
  • The asset's type in Eloqua. This is a read-only property.

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