Remove files from a directory (folder)
Detach files from a directory. The files themselves are not deleted: they stay in the workspace and in every other directory they belong to.
More details
More details
DELETE /v1/files.Path Parameters:directoryId(required): The directory to detach the files from
fileIds(string[], required): Ids of files to detach. At least 1, at most 100. Repeated ids are collapsed.
removed: detached by this requestnotAttached: not attached to this directory when the request ran
- The endpoint is safe to retry. Detaching a file that is already detached reports it as
notAttachedand is not an error. - Directories that have a workflow are rejected with a 422, and so are their immediate subfolders. Advancing a workflow on detach is not supported yet.
- A file that is a workflow result in this directory is rejected with a 422 naming the file ids; nothing in the request is detached.
directoryIdis echoed back in canonical lowercase form regardless of the case you send.
Authorizations
API key for authentication
Headers
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
Body
Ids of files to detach from the directory, at most 100 per request. Repeated ids are collapsed. An id that is not attached is reported in notAttached rather than failing the request.
1 - 100 elementsResponse
The detach request was processed. Check removed and notAttached for the per-file outcome.
The directory the documents were detached from.
"649e2d2d2d2d2d2d2d2d2d2d"
Ids detached from the directory by this request.
Ids that were not attached to this directory when the request ran — unknown, deleted, in another workspace, or simply never attached. Not an error, which makes the endpoint safe to retry.