Move Folder
POST/apiv2/pub/folders/{folder_id}/movedocuments_write
Moves a folder to a new parent. All descendant paths and document mappings are updated atomically.
Request
Content-Type: application/json
Path parameters
| Parameter | Type | Description |
|---|---|---|
folder_id | integer | Folder to move. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
new_parent_id | integer | Required | Target parent. 0 = move to root. |
Response
200 OK — The moved folder with updated full_path.
Errors
| Status | Reason |
|---|---|
| 400 | Cannot move into own descendant |
| 401 | Invalid or expired token |
| 404 | Folder or target not found |
cURL
curl -i -X POST "https://portal.docwize.com/apiv2/pub/folders/42/move" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"new_parent_id":99}'
{
"folder_id": 42,
"name": "Invoices",
"full_path": "Archive->Invoices",
"parent_id": 99,
"code": "a1b2c3d4-...",
"child_count": 3
}