---
title: "Rename a folder"
method: PATCH
path: "/v1/workspaces/{workspace_id}/folders/{folder_id}"
tags: ["Folders"]
---

# Rename a folder

`PATCH /v1/workspaces/{workspace_id}/folders/{folder_id}`

## Request

- Base URL: `https://api.stacksync.com`
- URL: `https://api.stacksync.com/v1/workspaces/{workspace_id}/folders/{folder_id}`
- Auth: HTTP bearer

A name another folder has in the region of the workspace is refused with 409, as a create refuses it. With validate_only, every check runs and 204 answers, nothing is saved.

## Path parameters

- `workspace_id` integer, required
- `folder_id` string, uuid, required

## Query parameters

- `region` 'besg' | 'usnv', required

## Request body

- UpdateFolderBody
  - `folder_name` string, required
  - `validate_only` boolean: Run every check of the write and answer 204 without writing: a refused write answers the error the write would

## Response `200`

OK

- Folder: A folder of the workspace
  - `folder_id` string, required
  - `folder_name` string, required
  - `folder_resource_id` string, required
  - `parent_folder_id` string, nullable, required: The folder it is in; None at the root
  - `region` 'besg' | 'usnv', required

## Other responses

- `204`: No Content
- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict

---

[API](https://skmtc.dev/stacksync/apis/stacksync-api.md) - [All operations](https://skmtc.dev/stacksync/apis/stacksync-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacksync/apis/stacksync-api/revisions/21f4ba4b214e?raw)
