Create folder

post
Create folder API

https://api.imagekit.io/v1/folder/
This will create a new folder. You can specify the folder name and location of the parent folder where this new folder should be created.
Request
Response
Request
Headers
Authorization
required
string
base64 encoding of your_private_api_key: Note the colon in the end.
Query Parameters
folderName
required
string
The folder will be created with this name. All characters except alphabets and numbers (inclusive of unicode letters, marks, and numerals in other languages) will be replaced by an underscore i.e. _
parentFolderPath
required
string
The folder where the new folder should be created, for root use / else containing/folder/ Note: If any folder(s) is not present in the parentFolderPath parameter, it will be automatically created. For example, if you pass /product/images/summer, then product, images, and summer folders will be created if they don't already exist.
Response
201: Created
Folder created successfully

Response structure and status code

On success, you will receive a 201 status code with an empty body.

Examples

Here is the example request to understand the API usage.

cURL
cURL
curl -X POST "https://api.imagekit.io/v1/folder/" \
-H 'Content-Type: application/json' \
-u your_private_key: -d '
{
"folderName" : "new_folder",
"parentFolderPath" : "source/folder/path"
}
'