# Update Cleanup Settings Updates patch cleanup settings. ## Endpoint `PUT /dcapi/patch/settings/cleanupSettings` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/patch/settings/cleanupSettings` ## Scope `DesktopCentralCloud.PatchMgmt.UPDATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Body ### application/json JSON Object | Attribute | Type | Required | Description | |---|---|---|---| | cleanupEnabled | boolean | Optional | Whether patch cleanup is enabled | | cleanupIntervalDays | string | Optional | Interval in days between cleanup runs | | cleanupOlderThanDays | string | Optional | Delete patches older than this many days | | deleteSupersededPatches | boolean | Optional | Whether to delete superseded patches | | deleteDeclinedPatches | boolean | Optional | Whether to delete declined patches | ## Sample Request ```curl curl --request PUT \ --url https://appdomains/dcapi/patch/settings/cleanupSettings \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{}' ``` ## Sample Request Body ### Enable declined patch cleanup ```json { "cleanupOlderThanDays": 90, "cleanupIntervalDays": 30, "deleteDeclinedPatches": true, "cleanupEnabled": true, "deleteSupersededPatches": true } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` JSON Object | Attribute | Type | Description | |---|---|---| | remarks | string | Confirmation message: Cleanup settings have saved successfully | ### Sample Response: HTTP 200 #### Cleanup settings saved ```json { "remarks": "Cleanup settings have saved successfully" } ``` ### HTTP Code 401 Response Body — `application/json` JSON Object | Attribute | Type | Description | |---|---|---| | error_code | string | Error code: UAC_UNAUTHORIZED for missing or invalid credentials | | error_description | string | Localized description: dc.rest.authentication.unauthorized | ### Sample Response: HTTP 401 #### Unauthorized access ```json { "error_description": "dc.rest.authentication.unauthorized", "error_code": "UAC_UNAUTHORIZED" } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.