---
title: "Create node roles"
method: POST
path: "/v2/noderole"
tags: ["Node Roles"]
---

# Create node roles

`POST /v2/noderole`

Create multiple node roles

## Request body

- object[]
  - `nodeClass` 'WINDOWS_SERVER' | 'WINDOWS_WORKSTATION' | 'LINUX_WORKSTATION' | 'MAC' | 'ANDROID' | 'APPLE_IOS' | 'APPLE_IPADOS' | 'AOSP' | 'VMWARE_VM_HOST' | 'VMWARE_VM_GUEST' | 'HYPERV_VMM_HOST' | 'HYPERV_VMM_GUEST' | 'LINUX_SERVER' | 'MAC_SERVER' | 'CLOUD_MONITOR_TARGET' | 'NMS_SWITCH' | 'NMS_ROUTER' | 'NMS_FIREWALL' | 'NMS_PRIVATE_NETWORK_GATEWAY' | 'NMS_PRINTER' | 'NMS_SCANNER' | 'NMS_DIAL_MANAGER' | 'NMS_WAP' | 'NMS_IPSLA' | 'NMS_COMPUTER' | 'NMS_VM_HOST' | 'NMS_APPLIANCE' | 'NMS_OTHER' | 'NMS_SERVER' | 'NMS_PHONE' | 'NMS_VIRTUAL_MACHINE' | 'NMS_NETWORK_MANAGEMENT_AGENT' | 'UNMANAGED_DEVICE' | 'MANAGED_DEVICE' — Node Class of the Device Role. Should match Parent Device Role's Node Class.
  - `nodeRoleParentName` string — Name of a Device Parent that will be created in this request that will act as the Parent Device Role for this Device Role. Should be null if nodeRoleParentId is assigned.
  - `nodeRoleParentId` integer — Id of an already existing Device Role to create this Node Role Under. Should be null if nodeRoleParentName is assigned.
  - `name` string — Device Role Name. Must be unique.
  - `description` string — Device Role Description.
  - `chassisType` 'UNKNOWN' | 'DESKTOP' | 'LAPTOP' | 'MOBILE' — Chassis Type for the Managed Device Roles that utilize it such as Workstations. Should be null if unused.
  - `icon` string — Icon Name of white-listed icon to be used for Unmanaged Device Roles. Should be null for all Managed Device Roles.

## Response `200`

Returns list of created node role

- object[]
  - `nodeClass` 'WINDOWS_SERVER' | 'WINDOWS_WORKSTATION' | 'LINUX_WORKSTATION' | 'MAC' | 'ANDROID' | 'APPLE_IOS' | 'APPLE_IPADOS' | 'AOSP' | 'VMWARE_VM_HOST' | 'VMWARE_VM_GUEST' | 'HYPERV_VMM_HOST' | 'HYPERV_VMM_GUEST' | 'LINUX_SERVER' | 'MAC_SERVER' | 'CLOUD_MONITOR_TARGET' | 'NMS_SWITCH' | 'NMS_ROUTER' | 'NMS_FIREWALL' | 'NMS_PRIVATE_NETWORK_GATEWAY' | 'NMS_PRINTER' | 'NMS_SCANNER' | 'NMS_DIAL_MANAGER' | 'NMS_WAP' | 'NMS_IPSLA' | 'NMS_COMPUTER' | 'NMS_VM_HOST' | 'NMS_APPLIANCE' | 'NMS_OTHER' | 'NMS_SERVER' | 'NMS_PHONE' | 'NMS_VIRTUAL_MACHINE' | 'NMS_NETWORK_MANAGEMENT_AGENT' | 'UNMANAGED_DEVICE' | 'MANAGED_DEVICE' — Node Class of the Device Role. Should match Parent Device Role's Node Class.
  - `nodeRoleParentName` string — Name of a Device Parent that will be created in this request that will act as the Parent Device Role for this Device Role. Should be null if nodeRoleParentId is assigned.
  - `nodeRoleParentId` integer — Id of an already existing Device Role to create this Node Role Under. Should be null if nodeRoleParentName is assigned.
  - `name` string — Device Role Name. Must be unique.
  - `description` string — Device Role Description.
  - `chassisType` 'UNKNOWN' | 'DESKTOP' | 'LAPTOP' | 'MOBILE' — Chassis Type for the Managed Device Roles that utilize it such as Workstations. Should be null if unused.
  - `icon` string — Icon Name of white-listed icon to be used for Unmanaged Device Roles. Should be null for all Managed Device Roles.

---

[API](https://skmtc.net/ninjarmm/apis/ninjaone-public-api-2-0.md) · [All operations](https://skmtc.net/ninjarmm/apis/ninjaone-public-api-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjarmm/ninjaone-public-api-2-0/revisions/753f26d46650/schema)
