# Update user group roles This endpoint updates roles assigned to a usergroup. Endpoint: PATCH /v3/companies/{companyId}/user-groups/{groupId}/roles Version: v3 Security: Bearer ## Path parameters: - `companyId` (string, required) Company ID of the user group. Example: "1234a66b-7493-4f41-908c-58ba81093653" - `groupId` (string, required) Identifier for the user group. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `rolesToAdd` (array) List of roles to be assigned to a principal. - `rolesToAdd.roleId` (string, required) Role identifier. Example: "1aeef911-44cf-49bb-83c7-e06b0d4e7ac2" - `rolesToAdd.scope` (object, required) The set of resources or the resource group that the role applies to. - `rolesToAdd.scope.audiences` (array, required) - `rolesToAdd.scope.audiences.predicates` (array, required) - `rolesToDelete` (array) List of roles to be removed for a principal. ## Response 400 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 404 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 200 fields