[comment]: # ({9d4a1084-9d4a1084})
# usergroup.update

[comment]: # ({/9d4a1084-9d4a1084})

[comment]: # ({9fdfde6c-9fdfde6c})
### Description

`object usergroup.update(object/array userGroups)`

This method allows to update existing user groups.

::: noteclassic
This method is only available to *Super admin* user type.
Permissions to call the method can be revoked in user role settings. See
[User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
for more information.
:::

[comment]: # ({/9fdfde6c-9fdfde6c})

[comment]: # ({5a594384-5a594384})
### Parameters

`(object/array)` User group properties to be updated.

The `usrgrpid` property must be defined for each user group, all other
properties are optional. Only the passed properties will be updated, all
others will remain unchanged.

Additionally to the [standard user group properties](object#user_group),
the method accepts the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|---------|---------------------------------------------------|-----------|
|rights|object/array|[Permissions](/manual/api/reference/usergroup/object#permission) to replace the current permissions assigned to the user group.|
|tag\_filters|array|[Tag based permissions](/manual/api/reference/usergroup/object#tag_based_permission) to assign to the group.|
|userids|string/array|IDs of the users to replace the users in the group.|

[comment]: # ({/5a594384-5a594384})

[comment]: # ({c04afd7f-c04afd7f})
### Return values

`(object)` Returns an object containing the IDs of the updated user
groups under the `usrgrpids` property.

[comment]: # ({/c04afd7f-c04afd7f})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({e1a75e7b-e1a75e7b})
#### Disabling a user group

Disable a user group.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "usergroup.update",
    "params": {
        "usrgrpid": "17",
        "users_status": "1"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "usrgrpids": [
            "17"
        ]
    },
    "id": 1
}
```

[comment]: # ({/e1a75e7b-e1a75e7b})

[comment]: # ({d5c7ed4f-d5c7ed4f})
### See also

-   [Permission](object#permission)

[comment]: # ({/d5c7ed4f-d5c7ed4f})

[comment]: # ({09e213c5-09e213c5})
### Source

CUserGroup::update() in
*ui/include/classes/api/services/CUserGroup.php*.

[comment]: # ({/09e213c5-09e213c5})
