# Save inactive device policy settings Save inactive device policy settings. ## Endpoint `PUT /api/v1/mdm/inactive_device_policy_settings` ### Request URL `https://{server-hostname}:8383/api/v1/mdm/inactive_device_policy_settings` ### Scope `MDMAdmin.UPDATE` ### Header `Authorization: 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: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"action_type":1,"action_threshold":1814400000,"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 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 ![](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.