---
title: "Mover um projeto para outro pai"
method: PUT
path: "/api/management/projects/{project}/hierarchy/move-to-parent"
tags: ["projects", "Hierarquia"]
---

# Mover um projeto para outro pai

`PUT /api/management/projects/{project}/hierarchy/move-to-parent`

Muda o projeto de lugar na estrutura, colocando-o sob outro pai. Enviar `new_parent_id` como `null` promove o projeto a raiz.

A movimentação é recusada quando criaria um ciclo ou quando a subárvore do projeto ultrapassaria o limite de quatro níveis de profundidade — veja [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).

## Request body

- object — Novo pai do projeto.
  - `new_parent_id` string, uuid — ID (UUID) do novo pai. `null` promove o projeto a raiz.

## Response `200`

Sucesso

- object — Confirmação da movimentação.
  - `response` boolean, required — Sempre true quando a operação é concluída.
  - `data` object, required — Resultado da movimentação.
    - `project` object — Identificação resumida de um projeto.
      - `id` string, uuid — ID (UUID) do projeto.
      - `name` string — Nome do projeto.
    - `old_parent` object — Pai anterior, quando havia.
    - `new_parent` object — Novo pai. `null` quando o projeto virou raiz.
    - `new_hierarchy_breadcrumb` string — Novo caminho do projeto, da raiz até ele.
    - `is_root` boolean — Indica se o projeto ficou na raiz.

## Changes

- **2026-09-18** `4a8f726dba52` — 1 breaking
  - the request property `new_parent_id` became not nullable
- **2026-08-24** `3c590152d5b5` — 3 breaking, 4 warning, 2 info
  - the `new_parent_id` request property type changed from no type to `string`, and format from no format to `uuid`
  - the response property `data/new_parent` became nullable for the status `200`
  - the response property `data/old_parent` became nullable for the status `200`
  - removed the optional property `data/new_parent/id` from the response with the `200` status
  - …5 more
- **2026-08-19** `3d619d9db20d` — 2 info
  - api tag `Hierarquia` added
  - api tag `{id}` removed
- **2026-08-19** `5501d8ecc8a0` — 1 info
  - added the media type `application/json` for the response with the status `200`
- **2026-08-19** `d270bef5be29` — 1 info
  - added optional request body

[Change history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/projects/:project/hierarchy/move-to-parent/put.md)

---

[API](https://skmtc.dev/olie-ai/apis/olie-api.md) · [All operations](https://skmtc.dev/olie-ai/apis/olie-api/llms.txt) · [OpenAPI document](https://skmtc.dev/olie-ai/apis/olie-api/revisions/d7bda7d32f67?raw)
