CLIENT
Client Document Management
DMS Folders

Bulk delete folders and documents (mixed)

Delete both folders and documents in a single atomic operation.

**Features:**
- Delete multiple folders and documents simultaneously
- Mixed selection support (folders + documents in one request)
- Automatic cascade deletion for folder contents
- Atomic operation with rollback on critical failures
- Comprehensive error reporting per item

**Request:**
- `folder_ids`: List of folder UUIDs to delete (optional)
- `document_ids`: List of document UUIDs to delete (optional)
- `reason`: Reason for deletion (required for audit trail)
- `cascade_delete`: If true, deletes all folder contents recursively (applies to folders only)

**Response:**
- `success_count`: Number of successfully deleted items (folders + documents)
- `failure_count`: Number of items that failed to delete
- `total_count`: Total number of items in the request
- `errors`: List of error details for failed deletions with item_id, item_type (folder/document), and error message
- `details`: Breakdown of folders vs documents deleted/failed

**Use Cases:**
- Delete selected items from folder contents view
- Clean up multiple items across different locations
- Batch delete operations from search results

**Notes:**
- At least one of `folder_ids` or `document_ids` must be provided
- Folders are processed before documents
- Non-empty folders will fail unless `cascade_delete=true`
- All deletions are soft deletes (can be recovered)
- Partial success is possible (some items deleted, others failed)
post/internal/api/clients/{client_id}/dms/folders/bulk-mixed-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[] nullable

List of folder IDs to delete

document_idsstring[] nullable

List of document IDs to delete

reasonstring required

Reason for deletion

cascade_deleteboolean

Whether to delete all contents within 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.