---
title: "Rename folder"
method: POST
path: "/v1/bulkJobs/renameFolder"
tags: ["Digital Asset Management (DAM)", "Managing folders"]
---

# Rename folder

`POST /v1/bulkJobs/renameFolder`

This API allows you to rename an existing folder. The folder and all its nested assets and sub-folders will remain unchanged, but their paths will be updated to reflect the new folder name.

## Request body

- object
  - `folderPath` string, required — The full path to the folder you want to rename.
  - `newFolderName` string, required — The new name for the folder. All characters except alphabets and numbers (inclusive of unicode letters, marks, and numerals in other languages) and `-` will be replaced by an underscore i.e. `_`.
  - `purgeCache` boolean — Option to purge cache for the old nested files and their versions' URLs. When set to true, it will internally issue a purge cache request on CDN to remove the cached content of the old nested files and their versions. There will only be one purge request for all the nested files, which will be counted against your monthly purge quota. Note: A purge cache request will be issued against `https://ik.imagekit.io/old/folder/path*` (with a wildcard at the end). This will remove all nested files, their versions' URLs, and any transformations made using query parameters on these files or their versions. However, the cache for file transformations made using path parameters will persist. You can purge them using the purge API. For more details, refer to the purge API documentation. Default value - `false`

## Response `202`

- JobResponse — Job submitted successfully. A `jobId` will be returned.
  - `jobId` string, required — Unique identifier of the bulk job. This can be used to check the status of the bulk job.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized request.
- `403` — Forbidden.
- `404` — Folder not found
- `409` — If a folder with newFileName already exist in the same location.
- `423` — Locked resource - A bulk operation is currently running on the folder.
- `429` — The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.

---

[API](https://skmtc.dev/imagekit-developer/apis/imagekit-api.md) · [All operations](https://skmtc.dev/imagekit-developer/apis/imagekit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imagekit-developer/imagekit-api/revisions/bb3e9ff84b3e/schema)
