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

# Move task to a different parent

> Change the parent of a task or promote to root level



## OpenAPI

````yaml /api-reference/openapi/EvoAI-CRM-Service/pipeline-tasks.yaml patch /api/v1/pipelines/{pipeline_id}/pipeline_tasks/{id}/move
openapi: 3.0.4
info:
  title: Evolution Foundation - CRM Service - Pipeline Tasks
  description: Management of contacts, conversations, inboxes, labels and macros
  version: 1.1.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3000
    description: Development server
    variables:
      port:
        default: '3000'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/pipelines/{pipeline_id}/pipeline_tasks/{id}/move:
    parameters:
      - name: pipeline_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    patch:
      summary: Move task to a different parent
      description: Change the parent of a task or promote to root level
      operationId: move-task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                new_parent_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: New parent task ID (null to make it a root task)
                new_position:
                  type: integer
                  description: Optional position in the new parent's subtasks
      responses:
        '200':
          description: Task moved successfully
        '422':
          $ref: '#/components/responses/validation_error'
      security:
        - userApiKey: []
components:
  responses:
    validation_error:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
  schemas:
    error_response:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
            - type: object
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token

````

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