NinjaOne icon

NinjaOne

Ninja One Public API documentation. <br><br>See also: <br> <a href="https://resources.ninjarmm.com/API/Ninja+RMM+Public+API+v2.0.5+Device+Filter+Syntax.pdf">Device Filter syntax</a><br><a href="https://app.ninjarmm.com/apidocs-beta/core-resources/articles/webhooks/overview">Webhooks</a>

Actions309

Management → Creates new Policy

AI-generated

Summary

Create a new management policy in NinjaOne with customizable attributes such as mode, name, description, node class, and enabled flag.

Inputs

  • Mode — Policy creation mode; options are NEW (default), CHILD, or COPY.
  • Template Policy Id — Template Policy identifier, used when mode is COPY or CHILD.
  • Parent Policy Id — Parent Policy identifier, applicable when mode is CHILD.
  • Name — Name of the new policy.
  • Description — Text description of the policy.
  • Node Class — Classification of the node/device for which the policy is applicable, e.g., WINDOWS_SERVER, MAC, LINUX_SERVER, etc.
  • Enabled — Boolean flag indicating if the policy is enabled (default true).
  • Custom Body — Arbitrary additional JSON to send in the request body, merged with standard fields.
  • Custom Headers — Additional HTTP headers to include in the request.
  • Query Filters — Custom query-string parameters to include in the request URL.
  • Batching — Batch size and interval settings for handling multiple input items.
  • Debug — Whether to include detailed request info in the output for troubleshooting.
  • Timeout — Maximum time to wait for the server response in milliseconds.

Output shape

a single JSON object representing the created policy, including server response details; may include debug information if enabled

The operation sends a POST request to '/v2/policies' with the specified parameters. Custom body fields take priority over standard ones. If batching is configured, multiple policies can be created in batches. Errors from the API are propagated as node execution errors.

Links

Discussion