> ## Documentation Index
> Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reorder a project's tasks

> Puts the tasks directly under one parent (a task, or the top of the project) in the order sent, as dragging them in the app's task table does. `task_ids` lists each of those tasks once; to move a task under another parent, change its `parent` with PATCH /v1/objects/task/records/{task_id} first. Returns the order as saved; 409 when one of the tasks moved or was deleted meanwhile, or another request is changing one (nothing is saved): try again.



## OpenAPI

````yaml /api/statisfy-api.openapi.json put /v1/objects/project/records/{project_id}/task-order
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/objects/project/records/{project_id}/task-order:
    put:
      tags:
        - projects
      summary: Reorder a project's tasks
      description: >-
        Puts the tasks directly under one parent (a task, or the top of the
        project) in the order sent, as dragging them in the app's task table
        does. `task_ids` lists each of those tasks once; to move a task under
        another parent, change its `parent` with PATCH
        /v1/objects/task/records/{task_id} first. Returns the order as saved;
        409 when one of the tasks moved or was deleted meanwhile, or another
        request is changing one (nothing is saved): try again.
      operationId: projects_set_task_order
      parameters:
        - description: >-
            The project's id. To find it from the project's name: make_get_call
            with path `/v1/objects/project/records` and query
            `{"filter[title][eq]": "<name>"}`
          in: path
          name: project_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                parent:
                  anyOf:
                    - maxLength: 64
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    The task whose subtasks to order; null (or left out) for the
                    project's top-level tasks
                  title: Parent
                task_ids:
                  description: >-
                    Every task directly under `parent`, each once, in the new
                    order (GET
                    /v1/objects/project/records/{project_id}/task-visibility
                    lists them with their parent, in today's order)
                  items:
                    maxLength: 64
                    minLength: 1
                    type: string
                  maxItems: 5000
                  minItems: 1
                  title: Task Ids
                  type: array
              required:
                - task_ids
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskOrder'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskOrder:
      properties:
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        task_ids:
          description: The tasks directly under `parent`, in their order as saved
          items:
            type: string
          title: Task Ids
          type: array
      required:
        - parent
        - task_ids
      title: TaskOrder
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.