---
title: "Changes the parent task and the order of subtasks."
method: POST
path: "/tasks/changesubtasks"
tags: ["tasks"]
---

# Changes the parent task and the order of subtasks.

`POST /tasks/changesubtasks`

Changes parent task and order of subtasks. If the parent task of a subtask changed, its lists, base type and entity
            will change to match the parent ones.
            It is not possible to change a task to subtask if the task already has subtasks.

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

## Headers

- `Authorization` string, required

## Request body

- ChangeSubtasksPostForm[]
  - `taskId` string, uuid, required — The id of the task.
  - `parentId` string, uuid, required — The id of the parent task.
  - `order` number, double, nullable — The order the subtask related to its parent.

## Response `204`

No Content

- object

## Other responses

- `400` — Bad Request

---

[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)
