Favicon

You are here: Home > API Reference > Apple > Apple Commands > Create bulk commands

Create bulk commands

Required Permission: mdm.apple.command.create

Creates and queues management commands for multiple targets simultaneously in a single operation.

POST
/v1/organizations/:organizationId/mdm/apple/enterprise/commands/:targetType
Copy to clipboard

Create bulk commands

Required Permission: mdm.apple.command.create

Creates and queues management commands for multiple targets simultaneously in a single operation.

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Organization identifier or slug used in path parameters for scoping API operations to specific organizational contexts.
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
targetType string
required
Command target classification specifying whether operation applies to device or device user affecting scope and available command types.
devicedeviceUser
Body Params application/json
command object optional
Apple MDM protocol command payload applied to all targets in bulk operation containing operation-specific parameters.
targetIds array [string] optional
Array of target identifiers receiving the command enabling simultaneous operation across multiple devices or users.
{
    "command": {
        "RequestType": "DeviceLock",
        "Message": "Device locked for security"
    },
    "targetIds": [
        "507f1f77bcf86cd799439016",
        "507f1f77bcf86cd799439017"
    ]
}

Responses

200 Response application/json
status boolean optional
data array [object] optional
id string optional
Unique identifier for the command record enabling tracking of individual Apple device management operations across their full execution lifecycle.
Match pattern: ^[a-fA-F0-9]{24}$
organization string optional
Reference to the organization owning this command providing organizational context and access control boundaries for device management operations.
Match pattern: ^[a-fA-F0-9]{24}$
admEnterprise string optional
Reference to the Apple Enterprise configuration under which this command executes linking operations to Apple MDM protocol resources.
Match pattern: ^[a-fA-F0-9]{24}$
targetType string optional
Command target classification specifying whether operation applies to device or device user affecting scope and available command types.
device deviceUser
targetId string optional
Identifier for the command target supporting device ID, serial number, IMEI, or user identifier enabling flexible targeting.
Match pattern: ^[a-fA-F0-9]{24}$
mdmUser string optional
Reference to the mobile device user associated with the target enabling user-specific command tracking and attribution for auditing.
Match pattern: ^[a-fA-F0-9]{24}$
UUID string optional
Apple MDM protocol command UUID uniquely identifying this operation within device-MDM server communication enabling correlation with Apple responses.
≤ 128 characters
status string optional
Current execution state indicating whether command is pending, acknowledged, completed, or encountered errors affecting subsequent action availability.
Pending Awaiting Error CommandFormatError Acknowledged Tried Cancel Superseded ProtectionCanceled
command object optional
Apple MDM protocol command payload object containing operation-specific parameters and instructions sent to target device.
from string optional
Command origin indicator specifying trigger source such as configuration change, sync operation, or manual execution.
force configurationChanged unknown sync refresh creation installApplication unInstallApplication deviceUpdated deviceUserUpdated profileUpdated applicationUpdated policyUpdated buildUpdated managedConfigurationChanged
data object optional
Additional command context data including device response, error information, or operation-specific metadata for troubleshooting.
sentAt string optional
Timestamp when command was transmitted to Apple Push Notification service for delivery to target device.
Format: date-time
receivedAt string optional
Timestamp when device acknowledged receipt of command indicating successful delivery through APNs infrastructure.
Format: date-time
triedAt string optional
Timestamp of most recent command execution attempt enabling retry tracking and failure pattern analysis for troubleshooting.
Format: date-time
canceledAt string optional
Timestamp when command was canceled by administrator or system preventing further execution attempts and marking operation as terminated.
Format: date-time
numTries integer optional
Counter tracking execution attempt count enabling retry limit enforcement and reliability monitoring for command delivery.
≥ 0
groupName string optional
Logical grouping identifier categorizing related commands together for consolidated display and operational organization within management interfaces.
≤ 128 characters
info object optional
Contextual metadata object containing references to related entities such as builds, assets, apps, profiles, or error details.
build any optional
createdAt string optional
Timestamp marking command creation establishing audit trail foundation and enabling time-based filtering for operational analysis.
Format: date-time
updatedAt string optional
Timestamp recording the most recent command state modification enabling change tracking and execution progress monitoring.
Format: date-time
{
    "status": true,
    "data": [
        {
            "id": "507f1f77bcf86cd799439011",
            "organization": "507f1f77bcf86cd799439012",
            "admEnterprise": "507f1f77bcf86cd799439013",
            "targetType": "device",
            "targetId": "507f1f77bcf86cd799439014",
            "mdmUser": "507f1f77bcf86cd799439015",
            "UUID": "550e8400-e29b-41d4-a716-446655440000",
            "status": "Pending",
            "command": {
                "RequestType": "DeviceInformation",
                "Queries": [
                    "DeviceName",
                    "OSVersion"
                ]
            },
            "from": "configurationChanged",
            "data": {
                "DeviceName": "iPhone 13 Pro",
                "OSVersion": "17.2.1"
            },
            "sentAt": "2026-02-10T12: 01:00Z",
            "receivedAt": "2026-02-10T12: 01:15Z",
            "triedAt": "2026-02-10T12: 01:30Z",
            "canceledAt": "2026-02-10T12: 02:00Z",
            "numTries": 3,
            "groupName": "DeviceInformation",
            "info": {
                "build": "string"
            },
            "createdAt": "2026-02-10T12: 00:00Z",
            "updatedAt": "2026-02-10T14: 30:00Z"
        }
    ]
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5091
message string optional
Invalid data
{
    "status": false,
    "error": {
        "code": 5091,
        "message": "Invalid data"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}