CLIENT
Client Document Management
DMS Folders

Bulk delete multiple folders

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
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)
  • Auth
    OAuth 2
    Password
    Token URL: /auth/login

Path parameters

client_idstring uuid required

Client ID

Request body

folder_idsstring[] required

List of folder IDs to delete

reasonstring required

Reason for deleting folders

cascade_deleteboolean

Whether to delete all contents (subfolders and documents) within the folders

Response

Successful Response

success_countinteger required

Number of successful operations

failure_countinteger required

Number of failed operations

total_countinteger required

Total number of operations attempted

renamed_documentsobject nullable

Documents that were auto-renamed due to conflicts. Key: document_id (str), Value: RenamedDocumentInfo

renamed_foldersobject nullable

Folders that were auto-renamed due to conflicts. Key: folder_id (str), Value: RenamedDocumentInfo

warningsstring[]

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.

Example response

{
  "details": {
    "documents_deleted": 13,
    "documents_failed": 1,
    "folders_deleted": 5,
    "folders_failed": 2
  },
  "errors": [
    {
      "entity_id": "123e4567-e89b-12d3-a456-426614174000",
      "entity_name": "Tax Documents 2024",
      "entity_type": "folder",
      "error": "Folder is not empty. Use cascade_delete=true to delete contents."
    },
    {
      "entity_id": "987fcdeb-51a2-43f7-b890-123456789abc",
      "entity_name": "W2_Form.pdf",
      "entity_type": "document",
      "error": "Document is locked and cannot be deleted."
    }
  ],
  "failure_count": 3,
  "success_count": 18,
  "total_count": 21
}

Changes

No recorded changes to this operation across all 1 revision of this API.