Move folder

post
Move folder API

https://api.imagekit.io/v1/bulkJobs/copyFolder
This will move one folder into another.
Request
Response
Request
Headers
Authorization
required
string
base64 encoding of your_private_api_key: Note the colon in the end
Body Parameters
sourceFolderPath
required
string
The full path to the source folder you want to move. For example /path/of/source/folder.
destinationPath
required
string
Full path to the destination folder where you want to move the source folder into. For example - /path/of/destination/folder/.
Response
200: OK
On success, you will receive a jobId which can be used to get the move operation's status.
{
"jobId" : "598821f949c0a938d57563bd"
}
404: Not Found
If no files or folders are found at specified sourceFolderPath then a 404 response is returned.
{
"message" : "No files & folder found at sourceFolderPath /folder/to/move",
"help" : "For support kindly contact us at support@imagekit.io .",
"reason" : "NO_FILES_FOLDER"
}

Response structure and status code

In case of error, you will get an error code along with the error message. On success, you will receive a 200 status code with JSON encoded response containing information about jobId. You can use jobId to get the status of this job using bulk job status API.

Examples

Here is the example request to understand the API usage.

cURL
cURL
curl -X POST "https://api.imagekit.io/v1/bulkJobs/moveFolder" \
-H 'Content-Type: application/json' \
-u your_private_key: -d '
{
"sourceFolderPath" : "/folder/to/move",
"destinationPath" : "/folder/to/move/into/"
}
'