Folders
Move files from one directory (folder) to another
Move files out of the source directory (path parameter) into targetDirectoryId, in one call.
POST
Move files from one directory (folder) to another
Request · Response · Guide: Folders
More details
More details
Each file ends up attached to the target and no longer attached to the source. Other directories the file belongs to are untouched.Path Parameters:
directoryId(required): The source directory the files are currently in
fileIds(string[], required): Ids of files to move. At least 1, at most 100. Repeated ids are collapsed.targetDirectoryId(string, required): The directory to move the files into. Must differ from the source.
moved: left the source and is now in the targetconflicted: was already in the target; detached from the source, so it now belongs to the target only. The pre-existing target row is kept as it is — any workflow step marker on the source row is not carried over.notAttached: not attached to the source when the request ran; nothing was done
- The endpoint is safe to retry. A second identical call reports every id as
notAttached. - Both directories must be visible to the API key. An unknown source is a 404
Directory not found.; an unknown target is a 404Target directory not found. - If either directory has a workflow, or is the immediate subfolder of one, the request is rejected with a 422. Advancing a workflow on move is not supported yet.
- A file that is a workflow result in the source directory is rejected with a 422 naming the file ids; nothing in the request is moved.
- Ids are echoed back in canonical lowercase form regardless of the case you send.
Headers
Body
application/json
Response
The move request was processed. Check moved, conflicted and notAttached for the per-file outcome.
Ids that were already in the target directory. They are detached from the source, so membership ends up the same as moved; the pre-existing target row is kept as it is, so a workflow step marker on the source row is not carried over. Reported separately so a retry is legible.
Example: