# Initiate agent uninstallation on computers Initiates an agent uninstallation request on one or more. ## Endpoint **POST** `/dcapi/som/computers/actionRequest/unInstallAgent` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/som/computers/actionRequest/unInstallAgent` ## Scope `DesktopCentralCloud.SOM.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers | Parameter | Type | Required | Value | |---|---|---|---| | Content-Type | string | Mandatory | `application/somComputerIDsToUninstallAgent.v1+json` | | Accept | string | Mandatory | `application/somComputerAgentUninstallStatus.v1+json` | ### Request Body `application/json` | Parameter | Type | Required | Description | |---|---|---|---| | computerIDs | JSON Array | Mandatory | Array of computer resource IDs to perform the uninstallation on (maximum 1000 per request) | | actionFeedback | string | Optional | Optional administrator-provided reason or feedback explaining why this action is being performed (max 500 characters) | | keepAssetPost | boolean | Optional | When SDP is integrated whether to keep the asset data in SDP | | removeMDMProfile | boolean | Optional | When set to true, the MDM (Mobile Device Management) profile is also removed from the computer along with the agent | ### Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/som/computers/actionRequest/unInstallAgent \ --header 'Accept: application/somComputerAgentUninstallStatus.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/somComputerIDsToUninstallAgent.v1+json' \ --data '{"computerIDs":["3001","3002","3003"]}' ``` ### Sample Request Body Uninstall agent from multiple computers ```json { "removeMDMProfile": true, "computerIDs": [ "3001", "3002", "3003" ], "keepAssetPost": false, "actionFeedback": "Decommissioning old workstations" } ``` ## Response Parameters ### HTTP Code 202 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | requestedComputers | array | Array of resource IDs originally submitted in the agent uninstallation request | | agentAvailableComputers | array | Array of resource IDs for computers where the agent is currently installed and available for uninstallation | | status | boolean | Indicates whether the agent uninstallation request was accepted and the delayed action was successfully queued | | actionRequestID | string | Unique tracking identifier for this uninstallation action request. | ### HTTP Code 400 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | statusCode | string | HTTP status code (400) | | errorCode | string | API-specific error code identifying the validation failure | | message | string | Error message describing the validation failure | ### HTTP Code 412 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | statusCode | string | HTTP status code (412) | | errorCode | string | Precondition failed error code identifying the business logic violation | | message | string | Error message describing the precondition failed while processing request | ## Possible Response Codes - `202` HTTP code - `400` HTTP code - `412` HTTP code ## Sample Response: HTTP 202 Uninstall request initiated ```json { "agentAvailableComputers": [ 3001, 3002 ], "requestedComputers": [ 3001, 3002, 3003 ], "actionRequestID": "AR-UNINST-1712567890456", "status": true } ``` ## Sample Response: HTTP 400 Missing or empty computerIDs in request ```json { "errorCode": "20006", "message": "Resource IDs are not present in the request", "statusCode": 400 } ``` ## Sample Response: HTTP 412 Non-admin user cannot access the requested computers ```json { "errorCode": "20005", "message": "Selected computers are not accessible", "statusCode": 412 } ``` Some computers are not managed by the server ```json { "errorCode": "30007", "message": "All resources are not managed computers", "statusCode": 412 } ``` ![](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.