Deletes a custom group by ID

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Permanently deletes the specified custom group identified by cgId. This action is irreversible. Fetch the cgId from Retrieve All Custom Groups. Requires admin or customer-admin privileges, or ownership of the group. System-generated groups (e.g., All Computers, All Users) cannot be deleted. Returns a success message with the deleted group name.

Request URL

https://{serverurl}/api/1.4/customgroup/deleteCg

Scope

DesktopCentralCloud.Common.UPDATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/jsonapplication/jsonCopied!

Must be application/json. Only JSON responses are supported.

- Query Parameters

cgIdlongMandatory

Resource ID of the custom group to delete. Fetch from Retrieve All Custom Groups

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url 'https://appdomain/api/1.4/customgroup/deleteCg?cgId=SOME_INTEGER_VALUE' \
  --header 'Accept: application/json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52'
Show full

Response Parameters

- HTTP code 200

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'deleteCg' for this endpoint.

message_responseJSON object

Response payload container.

Show Sub-Attributes
deletecgJSON object

Response payload.

Show Sub-Attributes
messagestring

Localized message: '{groupName} was successfully deleted!'.

message_versionstring

API version: '1.4'.

statusstring

'success' when the request completed without errors.

- HTTP code 404

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'deleteCg' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

'70506' (CG_INVALID_DETAILS_TO_UPDATE).

error_descriptionstring

Resolved I18N message: 'No such Custom Group found.'.

- HTTP code 500

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'deleteCg' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

Internal error code: '1003' (INTERNAL_ERROR).

error_descriptionstring

Resolved I18N message, typically: An internal error occurred while processing the request.

Possible Response Codes

200HTTP code
404HTTP code
500HTTP code

Sample Response: HTTP 200

Group and all its membership associations removed.

Copied!
  {
    "message_type": "deleteCg",
    "message_response": {
      "deletecg": {
        "message": "Windows Servers was successfully deleted!"
      }
    },
    "message_version": "1.4",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 404

Group ID does not exist or user lacks admin/owner privileges.

Copied!
  {
    "error_description": "No such Custom Group found.",
    "message_type": "deleteCg",
    "error_code": "70506",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

Sample Response: HTTP 500

Unexpected server-side failure during deletion.

Copied!
  {
    "error_description": "An internal error occurred while processing the request.",
    "message_type": "deleteCg",
    "error_code": "1003",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

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.