# Enable lost mode on multiple devices or groups simultaneously initiates bulk enable lost mode ## Endpoint **POST** `/api/v1/mdm/actions/enable_lost_mode` ## Request ### Request URL `https://{server-hostname}:8383/api/v1/mdm/actions/enable_lost_mode` ### Scope `MDMInventory.CREATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory** `application/json` - **Accept** `string` — **Mandatory** `application/json` #### Request Body `application/json` - **devices** `array` — **Mandatory** Array of device IDs to enable lost mode on. Fetch from [Get Device List](https://www.manageengine.com/products/desktop-central/help/api/onpremise/devices-get-device-list.html). - **groups** `array` — Optional Array of group IDs whose devices should have lost mode enabled. - **phone_number** `string` — Optional Contact phone number displayed on the lost device. - **lock_message** `string` — Optional Message displayed on the lost device lock screen. - **lost_mode_title** `string` — Optional Title displayed on the device in lost mode. - **audit_message** `string` — Optional Audit message for the action. - **ticket_id** `string` — Optional Associated ticket ID for the action. - **send_email_to_user** `boolean` — Optional Send email to user when lost mode is enabled. - **send_email_to_admin** `boolean` — Optional Send email to admin when lost mode is enabled. - **passcode** `string` — Optional Passcode for lost mode. ### Sample Request ```curl curl --request POST \ --url https://appdomain/api/v1/mdm/actions/enable_lost_mode \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"send_email_to_user":"true","lock_message":"This device has been lost.","devices":["9508000000013121","9508000000013691"],"send_email_to_admin":"true","lost_mode_title":"Device Lost","groups":["9007199254741597"],"phone_number":"+1-555-0****00","audit_message":"Bulk lost mode has been enabled","ticket_id":"9007199254741090","passcode":"1234"}' ``` ### Sample Request Body Enable lost mode on multiple devices ```json { "send_email_to_user": "true", "lock_message": "This device has been lost.", "devices": [ "9508000000013121", "9508000000013691" ], "send_email_to_admin": "true", "lost_mode_title": "Device Lost", "groups": [ "9007199254741597" ], "phone_number": "+1-555-0****00", "audit_message": "Bulk lost mode has been enabled", "ticket_id": "9007199254741090", "passcode": "1234" } ``` ## Response ### Response Parameters #### HTTP Code 200 Response Body — `application/json` - **success_list** `JSON Array` List of devices where the command was sent successfully. - **total_count** `integer` Total count of devices selected for the bulk action. - **not_applicable_count** `integer` Count of devices where the command is not applicable. - **success_count** `integer` Count of devices where the command was successfully initiated. - **na_list** `JSON Array` List of devices where the command is not applicable. ### Possible Response Codes - **200** — HTTP code ### Sample Response: HTTP 200 Bulk action result with success and not-applicable lists ```json { "success_list": [ { "device_id": "9508000000013121", "remarks": "--", "status": "SCHEDULED" } ], "total_count": 3, "not_applicable_count": 1, "success_count": 1, "na_list": [ { "device_id": "9508000000013691", "remarks": "Device is unmanaged", "status": "NOT_APPLICABLE" } ] } ``` ## Rate Limit **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.