---
title: "Reorder tasks — GanttFather API"
description: "Batch reorder and/or reparent — the only way to change a task's parentId."
canonical: "https://ganttfather.com/docs/api/reorder-tasks/"
locale: "en"
category: "product"
---

# Reorder tasks — GanttFather API

API reference [AI assistants (MCP)](https://ganttfather.com/docs/ai-agent/)

## Getting started

- [Introduction](https://ganttfather.com/docs/api/introduction/)
- [Authentication](https://ganttfather.com/docs/api/authentication/)
- [Pagination](https://ganttfather.com/docs/api/pagination/)
- [Rate limits & quotas](https://ganttfather.com/docs/api/rate-limits/)
- [Errors](https://ganttfather.com/docs/api/errors/)

## Projects

- [GET List projects](https://ganttfather.com/docs/api/list-projects/)
- [GET Get project](https://ganttfather.com/docs/api/get-project/)

## Tasks

- [GET List tasks](https://ganttfather.com/docs/api/list-tasks/)
- [GET Get task](https://ganttfather.com/docs/api/get-task/)
- [POST Create task](https://ganttfather.com/docs/api/create-task/)
- [PATCH Update task](https://ganttfather.com/docs/api/update-task/)
- [DELETE Delete task](https://ganttfather.com/docs/api/delete-task/)
- [POST Reorder tasks](https://ganttfather.com/docs/api/reorder-tasks/)
- [PUT Set assignees](https://ganttfather.com/docs/api/set-assignees/)

## Dependencies

- [GET List dependencies](https://ganttfather.com/docs/api/list-dependencies/)
- [PUT Set dependencies](https://ganttfather.com/docs/api/set-dependencies/)
- [POST Add dependency](https://ganttfather.com/docs/api/add-dependency/)
- [DELETE Remove dependency](https://ganttfather.com/docs/api/remove-dependency/)

## Resources

- [GET List resources](https://ganttfather.com/docs/api/list-resources/)
- [POST Create resource](https://ganttfather.com/docs/api/create-resource/)
- [PATCH Update resource](https://ganttfather.com/docs/api/update-resource/)
- [DELETE Delete resource](https://ganttfather.com/docs/api/delete-resource/)

## Members

- [GET List members](https://ganttfather.com/docs/api/list-members/)

 Tasks / **Reorder tasks**

# Reorder tasks

 POST

 Updated Jul 4, 2026

 Applies a batch of order/reparent instructions in one call. This is the **only** endpoint that can change a task’s parentId — [Update task](https://ganttfather.com/docs/api/update-task/) can’t reparent.

 On success the API returns 200 OK with the count of tasks updated.

## Path parameters

 Name Type Required Description

 projectId string (uuid) Yes The project the tasks belong to.

## Request body

 An array of items, each:

 Name Type Required Description

 id string (uuid) Yes The task to move.

 orderIndex number Yes New sort position among siblings.

 parentId string (uuid) No New parent. Omit to keep the current parent.

 The batch validates as a whole before anything is applied: a self-parent, a parent in another project, or a hierarchy cycle rejects the **entire batch** with 400 invalid_parent — nothing partially applies. A batch over 1,000 items is 400 too_many_items .

 curl -X POST https://api.ganttfather.com/v1/projects/{projectId}/tasks/reorder \
 -H "Authorization: Bearer glt_YOUR_TOKEN" \
 -H "Content-Type: application/json" \
 -d '[
 { "id": "0198f1a2-6b3d-7c9e-9a1f-2d4e5f6a7b8c", "orderIndex": 1000, "parentId": null },
 { "id": "0198f1a2-2222-7c9e-9a1f-2d4e5f6a7b8c", "orderIndex": 2000, "parentId": null }
 ]'

 Response 200 OK

 { "updated": 3 }

 Rather not write REST?

## Connect an AI assistant instead.

 [Explore MCP setup →](https://ganttfather.com/docs/ai-agent/)
