# Enables automatic package creation for one or more software Enables auto-update for specified software IDs by associating each with an auto-update policy. When enabled, new template packages are automatically created when updates are available. ## Endpoint **POST** `/dcapi/swDeployment/enableSWAutoUpdate` ## Request ### Request URL `https://{serverurl}/dcapi/swDeployment/enableSWAutoUpdate` ### Scope `DesktopCentralCloud.SWDeployment.CREATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** (string, Mandatory): `application/enableSWAutoUpdate.v1+json` - **Accept** (string, Mandatory): `application/enableSWAutoUpdate.v1+json` #### Request Body `application/json` - JSON Object - **softwareId** (long, Optional): Software ID to enable auto-update for. Obtain from the `swID` field in the response of the [List Auto Update Eligible Software](https://www.manageengine.com/products/desktop-central/help/api/cloud/templates-list-auto-update-eligible-software.html) API. - **policyId** (long, Optional): Auto-update policy ID to associate with this software. Obtain from the `policyId` field in the response of the [List Auto Update Policies](https://www.manageengine.com/products/desktop-central/help/api/cloud/templates-list-auto-update-policies.html) API. ### Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/swDeployment/enableSWAutoUpdate \ --header 'Accept: application/enableSWAutoUpdate.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/enableSWAutoUpdate.v1+json' \ --data '[{"softwareId":2001,"policyId":1}]' ``` ### Sample Request Body #### Enable auto-update for one software with a policy ```json [ { "softwareId": 2001, "policyId": 1 } ] ``` #### Enable for multiple software ```json [ { "softwareId": 2001, "policyId": 1 }, { "softwareId": 2002, "policyId": 2 } ] ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/json` - JSON Object - **status** (integer): `0` on success, `-1` on failure ### HTTP Code 401 Response Body: `application/json` - JSON Object - **errorCode** (long): Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required) - **errorMsg** (string): Authentication failure reason ### HTTP Code 500 Response Body: `application/json` - JSON Object - **errorCode** (string): `INTERNAL_ERROR` for general failures, `SW_INTERNAL_ERROR` for software deployment internal errors - **errorMessage** (string): Internal server error with details about the template/auto-update operation failure ### Possible Response Codes - **200**: HTTP code - **401**: HTTP code - **500**: HTTP code ### Sample Response: HTTP 200 #### Enabled successfully ```json { "status": 0 } ``` ### Sample Response: HTTP 401 #### User lacks required role ```json { "errorMessage": "Unauthorized access", "errorCode": "UAC_UNAUTHORIZED" } ``` ### Sample Response: HTTP 500 #### Server error ```json { "errorMessage": "Internal Server Error", "errorCode": "INTERNAL_ERROR" } ``` ## Rate Limits ![Help icon](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.