# Publishes packages to a custom group in the self service portal Creates a new SSP publish configuration for a custom group with specified packages, optional credentials, and install context settings. ## Endpoints **POST** `/dcapi/swDeployment/publishGroup/create` ## Request URL `https://{server-hostname}:8383/dcapi/swDeployment/publishGroup/create` ## Scope `SWDeployment.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` — **Mandatory**: `application/publishPackage.v1+json` - **Accept** `string` — **Mandatory**: `application/publishPackage.v1+json` ### Request Body `application/json` - `JSON Object` - **groupResourceId** `string` — Optional Resource ID of the target custom group. Obtain from the `groupResourceId` field in the response of the [List SSP Publish Groups](https://www.manageengine.com/products/desktop-central/help/api/onpremise/self-service-portal-list-publish-groups.html) API. - **configType** `integer` — Optional Configuration type: `1=Computer`, `2=User` - **packageDetails** `JSON Array` — Optional Array of package publish detail objects ## Sample Request ```curl curl --request POST \ --url https://appdomain/dcapi/swDeployment/publishGroup/create \ --header 'Accept: application/publishPackage.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/publishPackage.v1+json' \ --data '{"packageDetails":[{"packageId":10001,"packageApproval":0},{"packageId":10002,"packageApproval":0}],"configType":1,"groupResourceId":"301"}' ``` ## Sample Request Body ### Publish packages to a computer group ```json { "packageDetails": [ { "packageId": 10001, "packageApproval": 0 }, { "packageId": 10002, "packageApproval": 0 } ], "configType": 1, "groupResourceId": "301" } ``` ### Publish with credentials and install context ```json { "packageDetails": [ { "credentialDetails": { "credentialUUID": "abc-123", "credentialID": 100, "credentialName": "Admin" }, "packageId": 10003, "installUsing": "runAsUser", "allowUserToInteract": true, "packageApproval": 1 } ], "configType": 2, "groupResourceId": "302" } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` - `JSON Object` - **statusMsg** `string` Localized message describing the publish result. Contains success confirmation, archived package warning, or invalid package error. ### HTTP Code 401 Response Body — `application/json` - `JSON Object` - **errorCode** `long` Unauthorized error code returned when authentication credentials are missing, expired, or invalid (`authentication=required`) - **errorMsg** `string` Authentication failure reason ### HTTP Code 500 Response Body — `application/json` - `JSON Object` - **errorCode** `string` `INTERNAL_ERROR` for publish/modify failures, `SW_INTERNAL_ERROR` for SSP configuration errors - **errorMessage** `string` Internal server error with details about the SSP publish or group operation failure ## Possible Response Codes - **200** — HTTP code - **401** — HTTP code - **500** — HTTP code ## Sample Response: HTTP 200 ### Packages published successfully ```json { "statusMsg": "Packages published for the Group (Engineering Workstations)" } ``` ## Sample Response: HTTP 401 ### No access to publish ```json { "errorMessage": "The user has no access to publish packages.", "errorCode": "ACCESS_DENIED" } ``` ## Sample Response: HTTP 500 ### Server error ```json { "errorMessage": "Internal Server Error", "errorCode": "INTERNAL_ERROR" } ``` ## API Rate Limits ![](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.