Creates a static custom group (groupCategory=1) where members are explicitly specified via resource IDs. Required: groupName, groupType, groupCategory, resourceIds. Group name must be unique and max 100 characters. Prerequisites: Call Get Available Resources to discover valid resource IDs to include in resourceIds.
post /api/1.4/customgroup/addCg
https://{serverurl}/api/1.4/customgroup/addCg
DesktopCentralCloud.Common.UPDATECopied!
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Must be application/json. Request body must be valid JSON.
Must be application/json. Only JSON responses are supported.
Name for the new group. Must be unique. Max 100 chars.
Forbidden characters: ` \ : ; < > ? * " | & # % /
Must be 1 for static groups.
1 = Computers, 2 = Users.
Group description. Max 250 chars. Double quotes not allowed.
Array of long resource IDs to add as members. Fetch IDs from Get Available Resources.
curl --request POST \
--url https://appdomain/api/1.4/customgroup/addCg \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/json' \
--data '{"groupName":"Windows Servers","groupType":1,"groupCategory":1,"resourceIds":[101,102,103]}'Create a static computer group with three server members.
{
"groupName": "Windows Servers",
"groupType": 1,
"groupCategory": 1,
"description": "Production Windows Server machines",
"resourceIds": [
101,
102,
103
]
}
Create a static user group with two members.
{
"groupName": "HR Users",
"groupType": 2,
"groupCategory": 1,
"description": "Human Resources department users",
"resourceIds": [
501,
502
]
}
Always 'addCg' for this endpoint.
Response payload container.
Response payload.
Newly assigned resource ID (returned as string). Use as cgId in Delete CG, or as groupId in the request body of Update Static CG or Update Static Unique CG.
Name of the created group (echoed from request).
Numeric category as string: '1'=Static, '5'=Static Unique.
Group type as numeric string: '1' for Computers, '2' for Users. NOT the display name.
[Conditional] Array of resource IDs that were not found or not valid. Present only when some submitted resourceIds are invalid.
API version: '1.4'.
'success' when the request completed without errors.
Always 'addCg' for this endpoint.
API version: '1.4'.
Always 'error' for error responses.
'70501' (CG_CREATE_UPDATE_PARAMS_MISSING), '70502' (CG_DUPLICATE_NAME), '70504' (CG_INVALID_GROUP_TYPE), '70505' (CG_INVALID_GROUP_CATEGORY), '70503' (CG_NULL_CRITERIA_PATTERN), '70517' (CG_INVALID_CRITERIA_PATTERN), '70508' (CG_MORE_COMPUTERS_DUMMY_CG), '70513' (CG_INVALID_CREATION_MODE).
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), 'Invalid group type.' (70504), 'Invalid group category.' (70505), '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).
Always 'addCg' for this endpoint.
API version: '1.4'.
Always 'error' for error responses.
Internal error code: '1003' (INTERNAL_ERROR).
Resolved I18N message, typically: An internal error occurred while processing the request.
Static computer group created with assigned resource ID.
{
"message_type": "addCg",
"message_response": {
"addcg": {
"groupName": "Windows Servers",
"groupType": "1",
"groupCategory": "1",
"cgResourceId": "301"
}
},
"message_version": "1.4",
"status": "success"
}
Static group created but some submitted resource IDs were not found.
{
"message_type": "addCg",
"message_response": {
"addcg": {
"groupName": "Windows Servers",
"groupType": "1",
"groupCategory": "1",
"invalidResourceIds": [
999,
998
],
"cgResourceId": "301"
}
},
"message_version": "1.4",
"status": "success"
}
Required field (groupName, groupType, groupCategory, or resourceIds) is missing.
{
"error_description": "Required parameters are missing to create/update Custom Group.",
"message_type": "addCg",
"error_code": "70501",
"message_version": "1.4",
"status": "error"
}
A group with this name already exists.
{
"error_description": "Custom group name is already in use.",
"message_type": "addCg",
"error_code": "70502",
"message_version": "1.4",
"status": "error"
}
Unexpected server-side failure during group creation.
{
"error_description": "An internal error occurred while processing the request.",
"message_type": "addCg",
"error_code": "1003",
"message_version": "1.4",
"status": "error"
}
![]()
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.
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.