Bulk Delete Devices
POST /clients/{client_id}/devices/delete
Mark one or more devices as deleted. Deleted devices trigger agent self-uninstall. This operation is irreversible. This operation is idempotent -- deleting an already-deleted device is treated as a success.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
client_id | string (uuid) | Unique identifier for the client organization |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
device_ids | string (uuid)[] | Yes | List of device IDs to delete |
Example Request Body
{
"device_ids": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
]
}
Response
Returns a BulkDeviceControlResult with status 200 OK.
All succeeded
{
"succeeded": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
],
"failed": []
}
Business Rules
- Atomic per-device -- one failure does not roll back others.
- Deleting an already-deleted device succeeds (idempotent).
- If the client is
deleted, the entire operation is rejected (400). - One audit log entry created per affected device.
- Scales to 10,000 devices.
Example Request
curl -X POST "https://api.example.com/v2/clients/aa7cf840-9ca9-46a3-9778-9015d6580d50/devices/delete" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_ids": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890"
]
}'
Error Responses
| Status | Description |
|---|---|
| 400 | Invalid request (empty device_ids, client is deleted) |
| 401 | Authentication required |
| 403 | Insufficient permissions for this client |
| 404 | Client not found |
| 500 | Server error |
Related Endpoints
- Update Device Controls - Update a single device
- Bulk Enable Devices - Enable collection on multiple devices
- Bulk Disable Devices - Disable collection on multiple devices
- Collection Control Audit Log - Audit trail of all collection control changes