---
title: "Rename or move a folder"
method: PATCH
path: "/v1/folders/{folderId}"
---

# Rename or move a folder

`PATCH /v1/folders/{folderId}`

## Request

- Base URL: `https://api.payaion.com`
- URL: `https://api.payaion.com/v1/folders/{folderId}`
- Auth: one of:
  - API key in header `X-Aion-Key`
  - HTTP bearer

Renames a folder, re-parents it, or both. An absent `parentId` leaves the
parent alone; `null` moves the folder to the top level. A folder cannot be
moved inside itself or one of its own descendants.

## Path parameters

- `folderId` string, uuid, required

## Request body

- object
  - `name` string
  - `parentId` string, nullable

## Response `200`

Folder updated

- Folder
  - `folderId` string, uuid
  - `name` string
  - `parentId` string, nullable

## Other responses

- `401`: Invalid or missing credentials
- `403`: Scope denied or access forbidden
- `404`: Resource not found
- `409`: A folder with that name already exists in the target parent
- `422`: A field failed validation
- `429`: Rate limit exceeded

---

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