There should be a way to archive a folder through the API