---
title: "Edits multiple tasks using the specified operation."
method: POST
path: "/tasks/batch/{operation}"
tags: ["tasks"]
---

# Edits multiple tasks using the specified operation.

`POST /tasks/batch/{operation}`

Returns MultiStatus including the list of successful and failed tasks.
            
             Supported Operations:
             <ul>&gt;
             <li>movetoproject: Moves all tasks to a new project.</li><li>movetotasklist: Moves all tasks to a new task list inside the same project.</li><li>moveundertask: Moves every selected task (and their subtasks) under the specified parent task, validating project boundaries.</li><li>setdates: Sets the due and optionally start date for all tasks.</li><li>adjustdates: Offsets start and due dates by the specified number of days while respecting the user's timezone.</li><li>addtags: Adds a list of tags to all tasks in the list that don't already have the tag.</li><li>delete: Deletes all tasks. Optional including time trackings.</li><li>changetypeofwork: Changes the type of work for a list of tasks. Optionally also for the related timetrackings.</li><li>assignusers: Assigns a list of users to a list of tasks.</li><li>unassignusers: Unassigns a list of users from a list of tasks. If the UserIds are not provided, all users are unassigned.</li><li>setprio: Sets the prio flag for a list of tasks.</li><li>changetaskstatus: Sets the task status for a list of tasks.</li><li>copy: Creates copies of all specified tasks (including subtasks) and reorders them to maintain hierarchy.</li><li>plannerbatch: Multiple operations to a single task. Used in the planner.</li></ul><Check title="Required Permissions" icon="key">The user must have `write` permissions on all tasks as well as related entities modified by the operation.</Check>

## Path parameters

- `operation` string, required

## Headers

- `Authorization` string, required

## Request body

- BatchOperationForm
  - `taskIds` string[], required — The list of task ids to perform the batch operation on.
  - `newTaskListId` string, uuid, nullable — The id of the new task list. Needed if operation is 'movetotasklist'. Optional if operation is 'movetoproject'.
  - `removeFromCurrentList` boolean, nullable — Whether to remove the task from all its current task lists. Optional for operation 'movetotasklist'.
  - `newProjectId` string, uuid, nullable — The id of the new project to move the tasks to. Needed if operation is 'movetoproject'.
  - `newParentTaskId` string, uuid, nullable — The id of the task that will be the new parent of the selected tasks. Needed if operation is 'moveundertask'.
  - `newTaskStatusId` string, uuid, nullable — Deprecated for 'movetoproject': use TaskStatusMapping instead. The id of the new task status id to change the tasks to. Needed if operation is 'movetoproject' or 'changetaskstatus'.
  - `taskStatusMapping` TaskStatusMappingForm[], nullable — The task status mapping from old task status to new task status. Optional for operation 'movetoproject'.
    - `oldStatusId` string, uuid, required — The old task status id.
    - `newStatusId` string, uuid, required — The new task status id.
  - `newDueDate` string, date-time, nullable — The new due date for the tasks. Optional for operation 'setdates'. If not set, due and start date will be removed.
  - `newStartDate` string, date-time, nullable — The new start date for the tasks. Optional for operation 'setdates'. Only gets used when NewDueDate is set.
  - `removeDueDate` boolean, nullable — Whether to remove the due date. Required for operation 'setdates'.
  - `removeStartDate` boolean, nullable — Whether to remove the start date. Required for operation 'setdates'.
  - `tags` TagForm[], nullable — List of tags to add to the tasks. If task already has tag, tag is skipped.
    - `name` string, required — The name of the tag to delete.
    - `color` string, nullable — The color of the tag. Use one of 'red', 'coral', 'yellow', 'green', 'teal', 'arctic', 'blue', 'azure', 'purple', 'violet'.
  - `deleteTimeTrackings` boolean, nullable — Whether to delete the timetrackings of each task when deleting tasks. Optional for operation 'delete'.
  - `newTypeOfWorkId` string, uuid, nullable — The new type of work id for the tasks. Required if operation is 'changetypeofwork'.
  - `changeTimeEntries` boolean, nullable — Whether to change the type of work of the timeentries for each task aswell. Optional for operation 'changetypeofwork'.
  - `userIds` string[], nullable — Depending on the batch operation, it can be either the ids of the user to assign ('assignusers', required) or the ids of the user to remove ('unassignusers', optional, if not provided unassigns all users).
  - `removeOldAssignments` boolean, nullable — Whether to replace or add user assignments to a task that has users already assigned. Optional for operation 'assignusers'.
  - `isPrio` boolean, nullable — Whether to set the tasks to be prio or not. Required for operation 'setprio'.
  - `daysOffset` number, double, nullable — In case of an adjust date operation, define the number (positive or negative) of days that will be added/subtracted to the task dates. It can be a decimal number (fraction of day)
  - `adjustSuccessors` boolean, nullable — If set to true, it will adjust the dates of successor tasks as well.
  - `adjustSubtasks` boolean, nullable — If set to true, it will adjust the dates of subtasks of selected tasks. If set to false, it will only adjust the dates of the selected tasks.
  - `plannerData` PlannerOperationData — Data specific to planner batch operations for handling drag and drop in the planner UI.
    - `referenceTaskId` string, uuid, required — The reference task that was dragged (determines delta calculation).
    - `targetStartDate` string, date-time, nullable — Target start date for the reference task (used to calculate start date delta). Null if no start date change.
    - `targetEndDate` string, date-time, nullable — Target end date for the reference task (used to calculate end date delta). Null if no end date change. Allows extending or shortening task duration.
    - `targetLaneOrder` integer, nullable — Target lane order for vertical moves in planner. Null if no lane change.
    - `setDates` boolean — Whether to set absolute dates for the task (not delta-based). When true, only a single task can be modified. Only applies when TargetStartDate or TargetEndDate is provided.
    - `moveType` 'DateOnly' | 'LaneOnly' | 'DateAndLane' | 'AssigneeChange' | 'AssigneeAndLane' | 'AssigneeAndDate' — Defines the type of move operation in the planner.

## Response `207`

Multi-Status

- MultiStatusResult
  - `ok` StatusResult
    - `ids` string[], nullable
  - `notFound` StatusResult
    - `ids` string[], nullable
  - `unauthorized` StatusResult
    - `ids` string[], nullable
  - `badRequest` StatusResult
    - `ids` string[], nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
