Hi @alltej - as it stands today, you need to remove the assets from the folder before you can delete the folder itself. Using the API you would call the list-folder-members command to get all the assets within that folder, then iterate through them using delete-folder-membership until it is empty. Finally you can delete the folder using delete-folder.
To be clear, this does not delete the assets themselves, it just removes them from the folder.