How to programmatically create a new namespace?

How can I programmatically create a new namespace? Is there a way to create a bunch of identical namespaces, and for changes (such as new modules, pages, etc…) made to one namespace, they can be propagated automatically to the other sibling namespaces?

Hi @james

Thanks for your message. Are you trying to create a sort of multi-tenant environment or is your focus on site promotion (i.e. dev to test to production)? Could you give some more details on your use case please?

Kind regards,

Niall