# Creates a new scheduled task for remote power operations such as shutdown, restart, or log off Creates a new scheduled power operation task (shutdown, restart, log off, hibernate, or lock) targeting the specified computers or groups. Accepts a full task configuration JSON body including task name, operation type, platform, shutdown message, postpone or skip options, and schedule settings. ## Endpoint **POST** `/dcapi/tools/shutdown/tasks` ## Request ### Request URL `https://{server-hostname}:8383/dcapi/tools/shutdown/tasks` ### Scope `Tools.UPDATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Accept** `string` — **Mandatory** - `application/saveShutdownTask.v1+json` - **Content-Type** `string` — **Mandatory** - `application/shutdownTaskParams.v1+json` #### Request Body `application/json` - `JSON Object` - **taskDetails** `JSON Object` — Optional - **completionTime** `string` — Optional - **creationTime** `string` — Optional - **mode** `string` — Optional - **owner** `string` — Optional - **operation** `string` — Optional - **operationStr** `string` — Optional - **postPoneEnabled** `boolean` — Optional - **isDeleteOldTask** `boolean` — Optional - **isCloneTask** `boolean` — Optional - **reflectCustomGroupChanges** `boolean` — Optional - **shutdownMessage** `string` — Optional - **shutdownMessageTitle** `string` — Optional - **shutdownMode** `string` — Optional - **shutdownTimeout** `string` — Optional - **skipEnabled** `boolean` — Optional - **startTime** `string` — Optional - **status** `string` — Optional - **taskName** `string` — Optional - **taskID** `string` — Optional - RoleId. [Get Role Id](https://www.manageengine.com/products/desktop-central/help/api/onpremise/shutdown-create-shutdown-task.html?getRoles) - **taskPlatformID** `string` — Optional - **notifyOldTargetMessage** `boolean` — Optional - **oldTaskMessage** `string` — Optional - **winAvailable** `boolean` — Optional - **bothAvailable** `boolean` — Optional - **macAvailable** `boolean` — Optional - **skipOrPostPone** `string` — Optional - **postPoneCount** `string` — Optional - **isUpTimeEnabled** `boolean` — Optional - **upTimeCount** `integer` — Optional - **scheduleJsonObj** `JSON Object` — Optional - **targetData** `JSON Object` — Optional ### Sample Request ```curl curl --request POST \ --url https://appdomain/dcapi/tools/shutdown/tasks \ --header 'Accept: application/saveShutdownTask.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/shutdownTaskParams.v1+json' \ --data '{"targetData":{"envType":0,"targetValue":"Engineering","targetType":"CustomGroup"},"scheduleJsonObj":{"dailyTime":"03/25/2026, 23:00","scheduleType":"daily","taskTimeZone":"America/New_York","dailyIntervalType":"everyDay"},"taskDetails":{"mode":"new","postPoneEnabled":true,"operationStr":"Shutdown","shutdownTimeout":300,"skipEnabled":false,"taskName":"Nightly Shutdown","shutdownMessage":"System will shutdown in 5 minutes.","taskPlatformID":1,"operation":1}}' ``` ### Sample Request Body ```json { "targetData": { "envType": 0, "targetValue": "Engineering", "targetType": "CustomGroup" }, "scheduleJsonObj": { "dailyTime": "03/25/2026, 23:00", "scheduleType": "daily", "taskTimeZone": "America/New_York", "dailyIntervalType": "everyDay" }, "taskDetails": { "mode": "new", "postPoneEnabled": true, "operationStr": "Shutdown", "shutdownTimeout": 300, "skipEnabled": false, "taskName": "Nightly Shutdown", "shutdownMessage": "System will shutdown in 5 minutes.", "taskPlatformID": 1, "operation": 1 } } ``` ## Response ### Response Parameters #### HTTP Code 200 Response body: `application/json` - `JSON Object` - **status** `string` - Result of the operation: success or failure - **taskId** `long` - Unique identifier of the created or saved task ### Sample Response: HTTP 200 ```json { "taskId": 5, "status": "success" } ``` ### Possible Response Codes - **200** — HTTP code ## Rate Limit ![](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.