---
title: "Rename / move a folder"
method: POST
path: "/api/folders/rename"
tags: ["Folders"]
---

# Rename / move a folder

`POST /api/folders/rename`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/folders/rename`
- Auth: HTTP bearer

Renames or moves a folder from `old_path` to `new_path`, re-homing every note beneath it, and returns the affected note count. Returns 404 when the source folder does not exist and 409 when the target path is already occupied.

## Request body

- RenameRequest
  - `new_path` string, required
  - `old_path` string, required

## Response `200`

Renamed

- FolderRenameResponse
  - `count` integer
  - `new_path` string
  - `old_path` string
  - `renamed` boolean

## Other responses

- `404`: No such folder
- `409`: Target exists
- `422`: Target path cleans to nothing

---

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