Classic APIs
ClassicOrganizationsApi
updateOrgRole

updateOrgRole

Updates an existing role in a specific organization.

Parameters

NameTypeDescription
orgIdOrgIdThe ID of the organization to update a role in.
roleIdRoleIdThe ID of the role to update.
roleNameRoleNameThe new name for the role.
roleColorRoleColorThe new color for the role.

Example

const { data: updatedRoleInfo } = await ClassicOrganizationsApi.updateOrgRole({
  orgId: "4244556007738484576",
  roleId: "517896615410563397",
  roleName: "Admin",
  roleColor: "LightOrange",
}); 

Example Data

{
  id: "4508567586590971666",
  organizationId: "4244556007738484576",
  name: "Admin",
  color: "LightOrange",
  updatedTime: 2024-05-31T03:25:37.841Z,
} 

Endpoint

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