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 → Approve/Reject devices

AI-generated

Summary

Send a request to approve or reject one or more devices by specifying the mode and the device details.

Inputs

  • mode (required) — Set to 'APPROVE' to approve devices or 'REJECT' to reject devices.
  • additionalFields.devices — A JSON array representing the devices to be approved or rejected.
  • options.customBody — Optional JSON to override or extend the request body sent.
  • options.headerFilters — Custom HTTP headers to include in the API request.
  • options.queryFilters — Additional query string parameters to include in the API request.
  • options.batching — Controls batching of multiple input items to manage request throughput.
  • options.debug — If enabled, includes detailed debug information in the output.
  • options.timeout — Timeout in milliseconds for the API request.

Output shape

a single JSON response object from the API

The returned data includes the API response confirming the approval or rejection. If debug is enabled, the actual request details are included under a debug entry.

Examples

Example 1: Approve devices

Set mode to 'APPROVE' and provide device array JSON in 'Devices'. The node sends a POST to /v2/devices/approval/APPROVE.

Example 2: Reject devices with custom headers

Set mode to 'REJECT', supply devices, and add custom headers under Options to include authentication or other headers.

Links

Discussion