Change a role

update_workspace_role

Changes the name, the permissions or the default site role of a custom role, for everyone who holds it at once.

The name and the permission list are both required on every call, even when one of them is not changing, so send the current value of the one you are not changing. The permission list replaces the old one rather than adding to it, so send the full set.

Everyone on that role is affected at once, so read get_role_member_counts first to see how many people that is. workspace.delete and billing.manage stay with the owner and are not accepted, and an empty permission list is refused. You must hold every permission the role has now and every one you give it, otherwise it is refused with You can only edit roles within the permissions you have yourself!

defaultSiteRole changes the site role everyone on this role starts with on every site. Leave it out to keep the current one.

It needs the Manage roles permission (roles.manage). See Members and roles.

Inputs

Input Type Required Description
workspaceId string Yes The workspace id.
roleId string Yes The role id.
name string Yes The role name, 2 to 32 characters. Required on every call even when it is not changing.
permissions array of strings Yes The full new permission set, which replaces the old one rather than adding to it, with at least one of workspace.access, workspace.update, members.manage, roles.manage, projects.delete, projects.transfer, projects.move, projects.domains, folders.edit, folders.delete, folders.move and api.access. Required on every call even when it is not changing.
defaultSiteRole string No The site role people on this role start with on every site: editor, content-editor, viewer or no-access. Leave it out to keep the current one.