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
- application/json
Path Parameters
-
id(required): integer
The ID of the user to enable or disable
The request body defines whether to enable or disable the user with the specified ID
Root Schema : UserEnabled
Type:
object
Title:
Show Source
UserEnabled
-
enabled:
string
Whether or not the user's account is enabled or disabled. Set
{\"enabled\":true}
to enable a user, otherwise{\"enabled\":false}
. -
type:
string
The asset's type in Eloqua. This is a read-only property.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : UserEnabled
Type:
object
Title:
Show Source
UserEnabled
-
enabled:
string
Whether or not the user's account is enabled or disabled. Set
{\"enabled\":true}
to enable a user, otherwise{\"enabled\":false}
. -
type:
string
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.
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"
}