# Create Deployment Task Creates a new Deployment task with the specified configuration. ## Endpoint **POST** `/emsapi/osdeployer/tasks` ## Request URL ```text https://{server-hostname}:8383/emsapi/osdeployer/tasks ``` ## Scope ```text OSDTask.CREATE ``` ## Header ```text Authorization: d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Request Headers - **Content-Type** (`string`, Mandatory): `application/deploymentTaskDetails.v1+json` - **Accept** (`string`, Mandatory): `application/deploymentTaskCreatedStatus.v1+json` ### Request Body `application/deploymentTaskDetails.v1+json` JSON Object Request body for creating a new deployment task. - **taskName** (`string`, Mandatory): Display name of the deployment task. Matches uem_fileName regex. - **templateID** (`long`, Mandatory): Deployment template ID that defines the image and post-deployment actions. - **taskDescription** (`string`, Mandatory): Free-form description of the task. Pass an empty string if no description is needed. - **authCode** (`string`, Optional): One-time authorization code for agent enrolment. Required at the commit step (PUT /tasks/{taskId}), not at creation. - **applicableRemoteOffices** (`array`, Optional): Remote-office IDs the task is allowed to target. If omitted or empty, the task targets all offices. - **taskSettings** (`JSON Object`, Optional): Broadcast type, bandwidth limit, wait time, and schedule details for the task. - **remoteOfficeId** (`long`, Optional): Primary remote office that schedules and runs the task. - **mediaId** (`long`, Optional): ID of the OS Deployer boot media to be used by the task. - **resourceIDs** (`array`, Optional): OS Deployer resource IDs to be targeted by the task. ## Sample Request ```curl curl --request POST \ --url https://appdomain/emsapi/osdeployer/tasks \ --header 'Accept: application/deploymentTaskCreatedStatus.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/deploymentTaskDetails.v1+json' \ --data '{"taskDescription":"","taskName":"DeploymentTask6","templateID":1}' ``` ## Sample Request Body Create a deployment task with only the mandatory fields. ```json { "taskDescription": "", "taskName": "DeploymentTask6", "templateID": 1 } ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/deploymentTaskCreatedStatus.v1+json` JSON Object - **isTaskCreated** (`boolean`): True if the task was successfully created. - **isTaskCommitted** (`boolean`): False immediately after creation. Becomes true once the task is committed via PUT /tasks/{taskId}. Starting the task is a separate subsequent step. - **taskID** (`long`): ID of the newly created deployment task. ## Possible Response Codes - **200** (`HTTP code`) ## Sample Response: HTTP 200 Task created successfully. ```json { "isTaskCommitted": false, "isTaskCreated": true, "taskID": 200 } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 50 | **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.