Bulk create a set of 40 Workspaces from a Template

I need to create about 40 workspaces from an existing template. They’ll follow a standard naming convention. I’d love to be able to use an automation, script, or upload function to create these in bulk. Doing it manually, one-by-one, will take potentially hours.