PUT/v1/permission/user

Replace a user's permissions

Replaces a user's permissions with the supplied list. Provide username and permissions, using supported permission names without duplicates. The authenticated user must have ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE permission.

2 body fields

Username and the replacement permission list. Both username and permissions are required.

permissionsarray<string>required
The permissions to assign to the user. Values must be supported permission names, with no duplicates.
usernamestringrequired
The user's username. Must contain at least one character and match the allowed character pattern.

5 status codes
200Returns the updated user, including the username, email, permissions, and associated teams.
emailstringoptional
permissionsarray<object>optional
teamsarray<object>optional
usernamestringrequired
304Returned when the user already has the specified permissions.
400Returned when the request is invalid, including when required fields are missing or permission values are invalid.
401Returned when the authenticated user is not authorized to replace user permissions.
404Returned when the specified user cannot be found.

Error handling

A 400 is returned when the request is invalid, a 401 when the authenticated user lacks ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE permission, and a 404 when the user cannot be found. username and permissions are required; username must contain at least one character and match the allowed character pattern, and permissions must contain unique supported permission values.