File documents in a folder (tenant:dms:write)
POST /api/dms/v1/documents/move
Module: DMS · operationId: moveDocuments · Tag: Folders · Auth: access token (Authorization: Bearer <accessToken>)
Files up to 500 documents in one folder (folderId), or takes them out of every folder
(folderId: null). All or nothing: an unknown document answers 404, an unknown folder
422. Every document whose folder changes gets an audit entry (FOLDER); WORM-locked
documents and documents under legal hold can be moved, their content and retention stay.
Request body
application/json (required)
documentIds(array of string (uuid), required): Documents to filefolderId(string (uuid), nullable, required): Target folder;nulltakes the documents out of every folder
Example:
{
"documentIds": [
"3f6c2a1e-8b4d-4c7a-9e21-5d0b7a9c1f42"
],
"folderId": "3b1f6a2c-7d4e-4f1a-9c2b-8e5d0a1f7b63"
}
Responses
- 200 Moved (
application/json) - 400 Error (
application/json) - 404 Error (
application/json)
Fields of the 200 answer:
moved(integer, required): Documents whose folder changed
Example 200 answer:
{
"moved": 3
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/dms/v1/documents/move' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"documentIds":["3f6c2a1e-8b4d-4c7a-9e21-5d0b7a9c1f42"],"folderId":"3b1f6a2c-7d4e-4f1a-9c2b-8e5d0a1f7b63"}'