to navigate to open Esc to close Search by Algolia

API: Copying files or folders

Available since FileRun 2026.3.1.

Target URL /api.php/Drive/files/copy
Required scope download + upload
HTTP Method POST
Output format JSON

Request Parameters Reference

Parameter Type Required Description
path string Yes The FileRun path of the file or folder to copy. See this page
copyTo string Yes The FileRun path of the destination folder. See this page
overwrite boolean (1/0) No Set to 1 to replace an existing file of the same name at the destination.

The account needs to be allowed to download the source and to upload into the destination folder. A folder is copied together with its contents. A folder cannot be copied inside itself.

The response

The response carries the FileRun path of the copy in the path property, because the name of the copy is not always the name of the source:

Example response:

 1{
 2    "success": true,
 3    "msg": ["..."],
 4    "path": "/ROOT/HOME/Documents/Copy of report.pdf"
 5}