Note: Kandji has been rebranded as Iru. This documentation references "Kandji" as that remains the current API naming convention. All functionality works identically with the Iru platform.
This document provides a comprehensive reference for the Kandji API endpoints used in this MCP server.
- Method: Bearer token authentication
- Header:
Authorization: Bearer {apiToken} - Token Generation: Settings → Access → Add API Token
- US Region:
https://{subdomain}.api.kandji.io - EU Region:
https://{subdomain}.api.eu.kandji.io - API Version:
/api/v1
- Limit: 10,000 requests per hour per customer
- Strategy: Implement exponential backoff on 429 responses
GET /api/v1/devices
Description: Retrieve list of all devices in the tenant
Query Parameters:
blueprint_id(optional): Filter by blueprint UUIDplatform(optional): Filter by platform (Mac, iPhone, iPad, AppleTV)limit(optional): Number of results per pageoffset(optional): Pagination offset
Response: Array of device objects
GET /api/v1/devices/{deviceID}
Description: Retrieve detailed information about a specific device
Parameters:
deviceID(required): Device UUID
Response:
{
"device_id": "uuid",
"device_name": "string",
"serial_number": "string",
"platform": "Mac|iPhone|iPad|AppleTV",
"os_version": "string",
"model": "string",
"user_name": "string",
"user_email": "string",
"asset_tag": "string",
"blueprint_id": "uuid",
"blueprint_name": "string",
"last_check_in": "ISO 8601 timestamp",
"is_supervised": boolean,
"is_dep_enrolled": boolean,
"mdm_enabled": boolean,
"agent_installed": boolean
}GET /api/v1/devices/{deviceID}/apps
Description: List all applications installed on a device
Parameters:
deviceID(required): Device UUID
Response: Array of installed applications with versions
GET /api/v1/devices/{deviceID}/activity
Description: Retrieve activity log for a specific device
Parameters:
deviceID(required): Device UUID
Response: Array of activity events with timestamps
POST /api/v1/devices/{deviceID}/action/lock
Description: Send MDM command to remotely lock a device
Parameters:
deviceID(required): Device UUID
Request Body (macOS):
{
"message": "Optional lock screen message"
}Response (macOS):
{
"unlock_pin": "6-digit PIN"
}Notes:
- For macOS, an unlock PIN is generated and returned
- Command executes almost instantly via APNs
- Requires confirmation in MCP server implementation
POST /api/v1/devices/{deviceID}/action/restart
Description: Send MDM command to remotely restart a device
Parameters:
deviceID(required): Device UUID
Notes: Executes via APNs
POST /api/v1/devices/{deviceID}/action/shutdown
Description: Send MDM command to remotely shutdown a device
Parameters:
deviceID(required): Device UUID
POST /api/v1/devices/{deviceID}/action/erase
Description: Send MDM command to wipe/erase a device
Parameters:
deviceID(required): Device UUID
Request Body (optional):
{
"pin": "6-digit PIN for macOS",
"preserve_data_plan": boolean,
"disallow_proximity_setup": boolean
}CRITICAL:
- This is a destructive action
- Requires explicit
confirm: truein MCP tool - Should log audit trail
- User should be warned before execution
DELETE /api/v1/devices/{deviceID}
Description: Remove device record from Kandji (does not wipe device)
Parameters:
deviceID(required): Device UUID
GET /api/v1/blueprints
Description: Retrieve list of all blueprints in the tenant
Response: Array of blueprint objects
[
{
"id": "uuid",
"name": "string",
"description": "string",
"enrollment_code_is_active": boolean,
"enrollment_code": "string"
}
]GET /api/v1/blueprints/{blueprintID}
Description: Retrieve detailed information about a specific blueprint
Parameters:
blueprintID(required): Blueprint UUID
Response:
{
"id": "uuid",
"name": "string",
"description": "string",
"enrollment_code_is_active": boolean,
"enrollment_code": "string",
"library_items": [
{
"id": "uuid",
"name": "string",
"type": "profile|script|app"
}
]
}GET /api/v1/prism/device_information
Description: Retrieve comprehensive device inventory data
Query Parameters:
blueprint_id(optional): Filter by blueprintplatform(optional): Filter by platform
Response: Enhanced device data including compliance status
GET /api/v1/devices/{deviceID}/secrets/filevaultkey
Description: Retrieve FileVault recovery key for a macOS device
Parameters:
deviceID(required): Device UUID
Response:
{
"filevault_key": "recovery-key-string"
}CRITICAL:
- Highly sensitive endpoint
- Must implement PII redaction toggle
- Log all access attempts
- Consider additional confirmation requirement
All endpoints may return the following error responses:
{
"error": "Invalid or expired API token"
}Recovery: Regenerate API token in Kandji settings
{
"error": "Device not found"
}Recovery: Verify device ID is valid
{
"error": "Rate limit exceeded"
}Recovery: Implement exponential backoff, respect rate limits
{
"error": "Kandji API error"
}Recovery: Retry with backoff, check Kandji status page
For endpoints that return lists:
- Use
limitparameter to set page size (max typically 300) - Use
offsetparameter for pagination - Response includes total count in headers or metadata
-
Caching: Cache device and blueprint data with appropriate TTLs
- Devices: 5 minutes
- Blueprints: 30 minutes
- Compliance: 2 minutes
-
Error Handling: Always handle all error categories with proper recovery strategies
-
Rate Limiting: Track request count and implement client-side throttling
-
Security:
- Never log API tokens
- Redact PII when privacy mode enabled
- Audit log all destructive actions
-
Retries: Implement exponential backoff for transient failures
- Official API Documentation: https://api-docs.kandji.io/
- Kandji Support: https://support.kandji.io/kb/kandji-api