Classic APIs
ClassicOrganizationsApi
overwriteOrgRolePermissions

overwriteOrgRolePermissions

Overwrites permissions for a role of an organizations.

Parameters

NameTypeDescription
orgIdIdentifierThe ID of the organization to overwrite a roles permissions in.
roleIdIdentifierThe ID of the group to overwrite permissions for.
newPermissionsOverwriteOrgRolePermissions_NewPermissionsThe new permissions to assign to the role.

Example

const { data: success } = await ClassicOrganizationsApi.overwriteOrgRolePermissions({
  orgId: "4244556007738484576",
  roleId: "4500991930780611394",
  newPermissions: {
    manageMembers: true,
    manageRoles: true,
    configure: true,
    play: true,
    edit: true,
    viewAnalytics: true,
  },
}); 

Endpoint

PATCH /v1/organizations/{orgId}/roles/{roleId}/permissions