---
title: "Bulk delete multiple folders"
method: POST
path: "/internal/api/clients/{client_id}/dms/folders/bulk-delete"
tags: ["CLIENT", "Client Document Management", "DMS Folders"]
---

# Bulk delete multiple folders

`POST /internal/api/clients/{client_id}/dms/folders/bulk-delete`

## Request

- Base URL: `https://api.signalshq.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.signalshq.io/internal/api/clients/{client_id}/dms/folders/bulk-delete`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Delete multiple folders in a single operation with optional cascade deletion.

    **Features:**
    - Delete up to multiple folders at once
    - Optional cascade deletion to remove all nested contents (subfolders and documents)
    - Atomic operation with rollback on failure
    - Detailed error reporting for each failed deletion

    **Request:**
    - `folder_ids`: List of folder UUIDs to delete
    - `reason`: Reason for deletion (required for audit trail)
    - `cascade_delete`: If true, deletes all contents recursively; if false, only deletes empty folders

    **Response:**
    - `success_count`: Number of successfully deleted folders
    - `failure_count`: Number of folders that failed to delete
    - `total_count`: Total number of folders in the request
    - `errors`: List of error details for failed deletions (folder_id and error message)
    - `details`: Additional metadata about the operation

    **Notes:**
    - Non-empty folders will fail to delete unless `cascade_delete=true`
    - All deletions are soft deletes (can be recovered)
    - Operation is performed within a database transaction

## Path parameters

- `client_id` string, uuid, required: Client ID

## Request body

- BulkFolderDeleteRequest: Request schema for bulk folder deletion
  - `folder_ids` string[], required: List of folder IDs to delete
  - `reason` string, required: Reason for deleting folders
  - `cascade_delete` boolean: Whether to delete all contents (subfolders and documents) within the folders

## Response `202`

Successful Response

- BulkOperationResponse: Response schema for bulk operations
  - `success_count` integer, required: Number of successful operations
  - `failure_count` integer, required: Number of failed operations
  - `total_count` integer, required: Total number of operations attempted
  - `errors` BulkOperationError[]: List of errors with detailed information about each failed operation
    - `entity_id` string, required: UUID of the entity (folder or document) that failed
    - `entity_type` string, required: Type of entity (folder or document)
    - `entity_name` string, nullable: Name of the entity that failed (if available)
    - `error` string, required: Error message describing why the operation failed
  - `details` BulkOperationDetails: Detailed breakdown of bulk operation results. Uses *_deleted for delete ops, *_moved for move ops.
    - `folders_deleted` integer, nullable: Number of folders successfully deleted (bulk-delete only)
    - `folders_failed` integer, nullable: Number of folders that failed (delete or move)
    - `documents_deleted` integer, nullable: Number of documents successfully deleted (bulk-delete only)
    - `documents_failed` integer, nullable: Number of documents that failed (delete or move)
    - `folders_moved` integer, nullable: Number of folders in the move request / successfully moved (bulk-move only)
    - `documents_moved` integer, nullable: Number of documents in the move request / successfully moved (bulk-move only)
  - `renamed_documents` object, nullable: Documents that were auto-renamed due to conflicts. Key: document_id (str), Value: RenamedDocumentInfo
  - `renamed_folders` object, nullable: Folders that were auto-renamed due to conflicts. Key: folder_id (str), Value: RenamedDocumentInfo
  - `warnings` string[]: Non-fatal warnings surfaced to the CPA. For move operations: populated when any moved item lands inside a shared folder, meaning the client immediately gains access to those items.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/signalshq/apis/signals-api.md) - [All operations](https://skmtc.dev/signalshq/apis/signals-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signalshq/apis/signals-api/revisions/2c22af3b5576?raw)
