Favicon

You are here: Home > API Reference > Apple > Apple Commands > Cancel pending command

Cancel pending command

Required Permission: mdm.apple.command.cancel

Cancels a pending or retrying command, preventing it from being applied to the target.

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

Cancel pending command

Required Permission: mdm.apple.command.cancel

Cancels a pending or retrying command, preventing it from being applied to the target.

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
targetId string
required
Identifier for the command target supporting device ID, serial number, IMEI, or user identifier enabling flexible targeting.
Match pattern: ^(([a-fA-F0-9]{24})|(\w{1,}))$
admCommandId string
required
Unique command identifier used in path parameters to specify target command for retrieval or cancellation operations.
Match pattern: ^[a-fA-F0-9]{24}$

Responses

200 Response application/json
status boolean optional
data object optional
canceled string optional
Confirmation indicator with fixed value OK signaling successful command cancellation preventing further execution attempts.
OK
{
    "status": true,
    "data": {
        "canceled": "OK"
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5106
message string optional
AdmCommand not status pending or tried
{
    "status": false,
    "error": {
        "code": 5050,
        "message": "Feature not allowed for you billing plan"
    }
}
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"
    }
}