# Updates a static unique custom group's name, description, or member resources Updates a static unique custom group (`groupCategory=5`). Requires `groupId` and `resourceIds`. Only computer-type static unique groups exist (user-type static unique is not supported). Members must remain exclusive — resources already in another static unique group will be reported in `invalidResourceIds`. Important: Do not include `groupType` or `groupCategory` in the request body — these are immutable after creation and will be rejected. The `resourceIds` field is required and is a complete replacement of the member list — pass the full desired member set on every update. Prerequisites: Call [Get Available Resources](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-get-available-resources.html) to discover valid resource IDs for the replacement member list. ## Endpoint `POST /api/1.4/customgroup/updateCg` ## Request ### Request URL `https://`[*{serverurl}*](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)`/api/1.4/customgroup/updateCg` ### Scope `DesktopCentralCloud.Common.UPDATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers | Parameter | Type | Required | Value | Description | |---|---|---|---|---| | Content-Type | string | Mandatory | `application/json` | Must be `application/json`. Request body must be valid JSON. | | Accept | string | Mandatory | `application/json` | Must be `application/json`. Only JSON responses are supported. | #### Request Body `application/json` | Parameter | Type | Required | Description | |---|---|---|---| | groupId | long | Mandatory | Resource ID of the static unique group to update. Fetch from [Retrieve All Custom Groups](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-get-cglist.html). | | groupName | string | Optional | Updated group name. Max 100 chars. | | description | string | Optional | Updated description. Max 250 chars. | | resourceIds | array | Mandatory | Complete replacement member list. Members must be exclusive to this group — each resource can belong to only ONE static unique group of the same type. Fetch IDs from [Get Available Resources](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-get-available-resources.html). | ### Sample Request ```curl curl --request POST \ --url https://appdomains/api/1.4/customgroup/updateCg \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"groupId":310,"resourceIds":[101,102,103]}' ``` ### Sample Request Body Update a static unique group's exclusive member list. ```json { "groupName": "Privileged Servers", "groupId": 310, "description": "Updated - High-security servers with restricted technician access", "resourceIds": [ 101, 102, 103 ] } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | message_type | string | Always `updateCg` for this endpoint. | | message_response | JSON Object | Response payload container. | | message_version | string | API version: `1.4`. | | status | string | `success` when the request completed without errors. | #### Sample Response: HTTP 200 Static unique group members and details updated. ```json { "message_type": "updateCg", "message_response": { "updatecg": { "groupName": "Privileged Servers", "cgResourceId": "310" } }, "message_version": "1.4", "status": "success" } ``` Static unique group updated but some exclusive member resource IDs were not found. ```json { "message_type": "updateCg", "message_response": { "updatecg": { "groupName": "Privileged Servers", "invalidResourceIds": [ 999, 998 ], "cgResourceId": "310" } }, "message_version": "1.4", "status": "success" } ``` ### HTTP Code 404 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | message_type | string | Always `updateCg` for this endpoint. | | message_version | string | API version: `1.4`. | | status | string | Always `error` for error responses. | | error_code | string | `70506` (`CG_INVALID_DETAILS_TO_UPDATE`). | | error_description | string | Resolved I18N message: `No such Custom Group found.` — group does not exist, user is out of scope, or group is invalid for current product edition. | #### Sample Response: HTTP 404 Group ID does not exist or user lacks access. ```json { "error_description": "No such Custom Group found.", "message_type": "updateCg", "error_code": "70506", "message_version": "1.4", "status": "error" } ``` ### HTTP Code 412 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | message_type | string | Always `updateCg` for this endpoint. | | message_version | string | API version: `1.4`. | | status | string | Always `error` for error responses. | | error_code | string | `70501` (`CG_CREATE_UPDATE_PARAMS_MISSING`), `70502` (`CG_DUPLICATE_NAME`), `70509` (`CG_DUMMY_CG_RENAME`), `70503` (`CG_NULL_CRITERIA_PATTERN`), `70517` (`CG_INVALID_CRITERIA_PATTERN`), `70508` (`CG_MORE_COMPUTERS_DUMMY_CG`), `70513` (`CG_INVALID_CREATION_MODE`). | | error_description | string | Resolved I18N message varies by error code: `Required parameters are missing to create/update Custom Group.` (70501), `Custom group name is already in use.` (70502), `All Features Group cannot be renamed.` (70509), `Criteria pattern is empty.` (70503), `Invalid criteria pattern.` (70517), `Computer limit exceeded for free edition.` (70508), `Only manually created Custom Group is allowed to be accessed using external apis.` (70513). | #### Sample Response: HTTP 412 Required field `groupId` is missing. ```json { "error_description": "Required parameters are missing to create/update Custom Group.", "message_type": "updateCg", "error_code": "70501", "message_version": "1.4", "status": "error" } ``` ### HTTP Code 500 Response body: `application/json` | Parameter | Type | Description | |---|---|---| | message_type | string | Always `updateCg` for this endpoint. | | message_version | string | API version: `1.4`. | | status | string | Always `error` for error responses. | | error_code | string | Internal error code: `1003` (`INTERNAL_ERROR`). | | error_description | string | Resolved I18N message, typically: An internal error occurred while processing the request. | #### Sample Response: HTTP 500 Unexpected server-side failure during update. ```json { "error_description": "An internal error occurred while processing the request.", "message_type": "updateCg", "error_code": "1003", "message_version": "1.4", "status": "error" } ``` ## Rate Limit **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.