POST v2/api/users/{id}/enabled

Sets the activity of the specified Interactive User. Disabling a user also deactivates all associated API Credentials. Re-enabling a user sets them back to their exact previous active state - i.e. password and API Credentials are exactly as they were. This API call can only be made by the Administrator who created the target user.

Request Information

Parameters

NameDescriptionAdditional information
id
The identifier.

Define this parameter in the request URI.

newStateInput
The new activity state.

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "Enabled": "sample string 1"
}

Response Information

The newly updated Interactive User with their API Credentials is returned. This endpoint can only be called by the Administrator who created the target user, otherwise a 403:Forbidden is returned. The user's state must be a valid state, otherwise a 400:BadRequest is returned.

Response body formats

application/json, text/json

Sample:
{
  "Id": "5ac389c1-8ac8-4f03-ab2a-66efb92118f4",
  "Name": "sample string 2",
  "Username": "sample string 3",
  "Role": "sample string 4",
  "Credentials": [
    {
      "Id": "5fd11ea7-7f5c-4513-aad3-d61a13eeb64e",
      "Enabled": true,
      "Created": "2024-04-25T05:16:34.769006+00:00"
    },
    {
      "Id": "5fd11ea7-7f5c-4513-aad3-d61a13eeb64e",
      "Enabled": true,
      "Created": "2024-04-25T05:16:34.769006+00:00"
    },
    {
      "Id": "5fd11ea7-7f5c-4513-aad3-d61a13eeb64e",
      "Enabled": true,
      "Created": "2024-04-25T05:16:34.769006+00:00"
    }
  ],
  "Enabled": true,
  "Created": "2024-04-25T05:16:34.769006+00:00"
}