# Creates a new deployment with the specified resources, targets, and execution schedule Used to persist the deployment. ## Endpoints **POST** `/intelligence/api/deployments/v2/persistDeployment` ## Request URL `https://{serverurl}/intelligence/api/deployments/v2/persistDeployment` ## Scope `DesktopCentralCloud.DEX.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** `string` — Mandatory: `application/deploymentPersist.v2+json` - **Accept** `string` — Mandatory: `application/deploymentPersist.v2+json` ### Request Body `application/json` - `JSON Object` - **deploymentName** `string` — Optional Name for the new deployment - **deploymentType** `integer` — Optional Deployment type code: `0=Immediate`, `1=Scheduled`, `2=Trigger`. Fetch options from [Get Deployment Types](https://www.manageengine.com/products/desktop-central/help/api/cloud/dex-get-deployment-types.html). - **resourcesDetails** `JSON Array` — Optional Resources to deploy - **targetData** `JSON Object` — Optional Target selection for the deployment - **executionData** `JSON Object` — Optional Execution scheduling configuration; empty object for immediate deployments ## Sample Request ```curl curl --request POST \ --url https://appdomains/intelligence/api/deployments/v2/persistDeployment \ --header 'Accept: application/deploymentPersist.v2+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/deploymentPersist.v2+json' \ --data '{}' ``` ### Sample Request Body ```json { "deploymentType": 0, "targetData": { "included": [ { "label": "All Windows Devices", "value": "10" } ] }, "resourcesDetails": [ { "versionID": 1001, "resourceTypeID": 1 } ], "deploymentName": "Onboarding Deployment", "executionData": {} } ``` ## Response Parameters ### HTTP Code 202 Response Body — `application/json` - `JSON Object` - **message** `string` Confirmation message including the created deployment name and id ## Possible Response Codes - **202** — HTTP code ## Sample Response: HTTP 202 ```json { "message": "Deployment 'Onboarding Deployment' created successfully with ID '42'." } ``` ![ ](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.