mv operation — the file is removed from its original location and placed at the new path. If the destination directory does not exist, the operation will fail.
Endpoint
Authorization
Include your API key in the request header:Path Parameters
The unique identifier of your application. You can find this in the URL of your application’s dashboard.
Body Parameters
The current path of the file you want to move, relative to the root of your application. Example:
/old/location/file.txt.The destination path to move the file to, relative to the root of your application. Example:
/new/location/file.txt. To rename a file without moving it, keep the directory the same and change the filename only.Response
Indicates the outcome of the request. Returns
"success" when the file has been moved successfully.Examples
Response Example
To rename a file without moving it to a different directory, set both
path and to to the same directory but with a different filename. For example: "path": "/src/old-name.js" and "to": "/src/new-name.js".