# Save inactive device policy settings Save inactive device policy settings. ## Endpoint `PUT /api/v1/mdm/inactive_device_policy_settings` ## Request ### Request URL https://[{{serverurl}}](https://www.manageengine.com/mobile-device-management/help/api/cloud/oauth-authentication-endpoint-domain.html)/api/v1/mdm/inactive_device_policy_settings ### Scope `MDMOnDemand.MDMAdmin.UPDATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory**: `application/json` - **Accept** `string` — **Mandatory**: `application/json` #### Request Body `application/json` - **action_type** `integer` — **Mandatory**: Action to perform on inactive devices. `0` = No Action (default), `1` = Remove Inactive Devices, `2` = Retire Inactive Devices, `3` = Unassign License. - **action_threshold** `long` — Optional: Threshold period in milliseconds to perform the action on an inactive device. Default is `0`. Example: `1814400000` (21 days). - **inactive_threshold** `long` — **Mandatory**: Threshold period in milliseconds to move the device to inactive state. Example: `1728000000` (20 days). - **notification_type** `integer` — Optional: To send email notifications when device is inactive, to the assigned user. `0` - No notification, `1` - Notifications only for mobile devices, `2` - Notifications only for computers, `3` - Notification for all devices. ### Sample Request ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/inactive_device_policy_settings \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"action_type":1,"inactive_threshold":1728000000}' ``` ### Sample Request Body #### Remove devices inactive for 21 days after 20-day warning threshold ```json { "action_type": 1, "action_threshold": 1814400000, "inactive_threshold": 1728000000 } ``` #### Retire devices inactive for 21 days after 20-day warning threshold ```json { "action_type": 2, "action_threshold": 1814400000, "inactive_threshold": 1728000000 } ``` #### Set no-action policy with default thresholds ```json { "action_type": 0, "action_threshold": 0, "inactive_threshold": 1728000000 } ``` #### Unassign MDM license for devices inactive for 21 days ```json { "action_type": 3, "action_threshold": 1814400000, "inactive_threshold": 1728000000 } ``` ## Response ### Response Parameters #### HTTP code 204 Response Body — `application/json` - **status** `string`: Current status. Set to `acknowledged` if inactive device policy settings were successfully saved. ### Possible Response Codes - **204** — HTTP code ### Sample Response: HTTP 204 Inactive device policy settings saved successfully. ```json { "status": "acknowledged" } ``` ## Rate Limits ![Help icon](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **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.