---
title: "Reorder card subtasks"
method: POST
path: "/api/cards/{cardId}/subtasks/reorder"
tags: ["Subtasks"]
---

# Reorder card subtasks

`POST /api/cards/{cardId}/subtasks/reorder`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/cards/{cardId}/subtasks/reorder`
- Auth: HTTP bearer

## Request body

- SubtaskReorder
  - `subtaskIds` string[], required

## Response `200`

Success

- SubtaskItemsResponse
  - `items` Subtask[], required
    - `id` string, uuid, required
    - `cardId` string, uuid, required
    - `title` string, required
    - `startDate` string, date, nullable, required
    - `endDate` string, date, nullable, required
    - `scheduleState` 'unclassified' | 'planned' | 'suspended' | 'cancelled', required: Meaning of the retained schedule. Unclassified means its intent has not been reviewed; suspended/cancelled retain the plan for retrospective comparison.
    - `actualStartDate` string, date, nullable, required: Observed start, explicitly recorded from evidence. Independent of the schedule; null means unknown, never not started.
    - `actualEndDate` string, date, nullable, required: Observed end, explicitly recorded from evidence. May fall outside the plan. Null means unknown, never incomplete.
    - `order` integer, required
    - `color` string, required
    - `createdAt` string, date-time, required

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
