Classic APIs
ClassicOrganizationsApi
createOrgRole

createOrgRole

Creates a role in a specific organization.

Parameters

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

Example

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

Example Data

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

Endpoint

POST /v1/organizations/{orgId}/roles