POST
Move files from one directory (folder) to another
Request · Response · Guide: Folders
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
Request Body:
  • 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.
Response: Every id you send is returned in exactly one of three arrays:
  • moved: left the source and is now in the target
  • conflicted: 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
Notes:
  • 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 404 Target 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.

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

Idempotency-Key
string

Optional opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true.

Path Parameters

directoryId
string
required

Body

application/json
fileIds
string[]
required

Ids of files to move out of the source directory, at most 100 per request. Repeated ids are collapsed. An id that is not attached to the source is reported in notAttached rather than failing the request.

Required array length: 1 - 100 elements
Example:
targetDirectoryId
string
required

The directory to move the files into.

Example:

"649e2d2d2d2d2d2d2d2d2d2f"

Response

The move request was processed. Check moved, conflicted and notAttached for the per-file outcome.

sourceDirectoryId
string
required

The directory the documents were moved out of.

Example:

"649e2d2d2d2d2d2d2d2d2d2d"

targetDirectoryId
string
required

The directory the documents were moved into.

Example:

"649e2d2d2d2d2d2d2d2d2d2f"

moved
string[]
required

Ids that left the source and are now in the target.

Example:
conflicted
string[]
required

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:
notAttached
string[]
required

Ids that were not attached to the source directory when the request ran. Nothing was done for them.

Example: