---
title: "Set Project Parent"
method: POST
path: "/projects/{project_id}/parent"
---

# Set Project Parent

`POST /projects/{project_id}/parent`

## Request

- Base URL: `https://usemeridian.us` (the document declares no server; this is the origin it was published from)
- URL: `https://usemeridian.us/projects/{project_id}/parent`
- Auth: none declared

0fed6a42 — set / change / clear a project's parent (subproject hierarchy).

REST mirror of the ``set_parent_project`` MCP tool, wired for the dashboard's
"Make subproject of…" / "Detach from parent" kebab actions. Body:
``{"parent_project_id": "<id>"}`` to nest, or ``{"parent_project_id": null}``
to detach to top level.

Validation lives in ``db.set_parent_project`` and enforces the one-level-deep
invariant (a project cannot be its own parent, the parent must itself be
top-level, and a project that already has subprojects cannot become one). A
violation raises ``ValueError`` → 400; an unknown ``project_id`` → 404.
Broadcasts a ``project_parent_changed`` WS event so other open dashboards
re-render their sidebar tree.

## Path parameters

- `project_id` string, required

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/usemeridian/apis/meridian.md) · [All operations](https://skmtc.dev/usemeridian/apis/meridian/llms.txt) · [OpenAPI document](https://skmtc.dev/usemeridian/apis/meridian/revisions/f37a894bd374?raw)
