# Creates a new application group with specified rules Creates a new application group (whitelist or blacklist) with the specified application rules. Use the [Get App Rules by Type](https://www.manageengine.com/products/desktop-central/help/api/cloud/acp-get-app-rule-types.html) API to retrieve vendorID, productVendorID, or storeAppID values to use as verifiedAppRepoIDs or unVerifiedAppRepoIDs in the request body. ## Endpoints **POST** `/dcapi/appctrl/appgroups` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/appctrl/appgroups` ## Scope `DesktopCentralCloud.AppControl.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` **Mandatory**: `application/addAppGroupRules.v1+json` - **Accepts** `string` **Mandatory**: `application/json` ### Request Body `application/json` - `JSON Object` - **appGroupType** `integer` **Mandatory**: Application group type (0=Custom, 1=Whitelist, 2=Blacklist) - **platformID** `integer` **Mandatory**: Platform ID (1=Windows, 2=Mac) - **description** `string` **Optional**: Description of the application group (can be empty) - **appGroupName** `string` **Mandatory**: Name of the application group - **addedRules** `JSON Array` **Mandatory**: Array of rules to add to the group — prefetch IDs from [Get App Rule Types](https://www.manageengine.com/products/desktop-central/help/api/cloud/acp-get-app-rule-types.html) - **removedRules** `array` **Mandatory**: Array of rules to remove (empty array for new group creation) ## Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/appctrl/appgroups \ --header 'Accepts: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/addAppGroupRules.v1+json' \ --data '{"removedRules":[],"appGroupName":"Test 1","appGroupType":0,"platformID":1,"addedRules":[{"appRuleType":1},{"appRuleType":9}]}' ``` ## Sample Request Body ### Create an application group with vendor rules (verified) and store app rules (unverified) ```json { "removedRules": [], "appGroupName": "Test 1", "appGroupType": 0, "description": "", "platformID": 1, "addedRules": [ { "appRuleType": 1, "verifiedAppRepoIDs": [ "302", "314", "311", "313" ] }, { "appRuleType": 9, "unVerifiedAppRepoIDs": [ "5", "6", "10" ] } ] } ``` ### Create a whitelist group with product rules ```json { "removedRules": [], "appGroupName": "Approved Applications", "appGroupType": 1, "description": "Whitelist for approved software", "platformID": 1, "addedRules": [ { "appRuleType": 2, "verifiedAppRepoIDs": [ "15", "13", "12" ] } ] } ``` ### Create a blacklist group with executable hash rules ```json { "removedRules": [], "appGroupName": "Blocked Applications", "appGroupType": 2, "description": "Blocked malicious executables", "platformID": 1, "addedRules": [ { "appRuleType": 4, "verifiedAppRepoIDs": [ "101", "102" ] } ] } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` - `JSON Object` - **appGrpId** `string`: Unique identifier of the newly created application group ### HTTP Code 400 Response Body — `application/json` - `JSON Object` - **errorCode** `string`: Error code: INVALID_REQUEST for validation failures - **errorMessage** `string`: Detailed validation error message ### HTTP Code 401 Response Body — `application/json` - `JSON Object` - **errorCode** `long`: Unauthorized error code: credentials missing, expired, or invalid - **errorMsg** `string`: Authentication failure reason ### HTTP Code 500 Response Body — `application/json` - `JSON Object` - **errorCode** `string`: Internal error code: INTERNAL_ERROR when exception occurs creating app group - **errorMessage** `string`: Detailed message: Exception Occurred While creating AppGroup ## Possible Response Codes - **200** HTTP code - **400** HTTP code - **401** HTTP code - **500** HTTP code ## Sample Response: HTTP 200 Application group created successfully ```json { "appGrpId": "2" } ``` ## Sample Response: HTTP 400 Invalid request parameters ```json { "errorMessage": "Invalid application group type or platform ID", "errorCode": "INVALID_REQUEST" } ``` ## Sample Response: HTTP 401 Authentication credentials missing or invalid ```json { "errorMessage": "Authentication credentials are missing or invalid", "errorCode": "UNAUTHORIZED" } ``` ## Sample Response: HTTP 500 Internal error while creating application group ```json { "errorMessage": "Exception Occurred While creating AppGroup", "errorCode": "INTERNAL_ERROR" } ``` ![](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.