メインコンテンツまでスキップ

Delete Folder

DELETE/apiv2/pub/folders/{folder_id}documents_write

Permanently deletes a folder and all subfolders. Documents exclusively in this subtree are permanently deleted. Documents also in other folders are only unlinked.

Request

Path parameters

ParameterTypeDescription
folder_idintegerFolder to delete.

Response

200 OK
FieldTypeDescription
folder_idintegerThe deleted folder.
folders_deletedintegerTotal folders removed (including descendants).
documents_deletedintegerDocuments permanently deleted (exclusive to subtree).
mappings_removedintegerFolder-document associations removed.

Document deletion logic

LocationResult
Only in this subtreePermanently deleted (files, archives, groups, record)
In subtree and other foldersUnlinked only — document preserved

Errors

StatusReason
401Invalid or expired token
404Folder not found or access denied

cURL

curl -i -X DELETE "https://portal.docwize.com/apiv2/pub/folders/42" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

{
"folder_id": 42,
"folders_deleted": 4,
"documents_deleted": 12,
"mappings_removed": 18
}
{"detail": "Folder not found or access denied"}