If you want to create a new SharePoint site using the Client Object Model, you can use the class WebCreationInformation to specify the site’s properties and then create it by adding the site to the Web.

SharePoint-2013-Hosting

However, it is required to pass a unique TemplateType as a parameter. This parameter is a string and must match with one of the names of the available templates.

To get the list of all available templates, you can run the command Get-SpoWebTemplate in PowerShell. The table below gives an overview of all available templates.

 

As the libraries contained in the package Microsoft.SharePoint online.CSOM doesn’t provide any enumerator for the available templates. I have created the following snippet.

C#

To access the EnumMember attribute, we have to use the following Enum extension method.

C#

Now, to create a new website on SharePoint would be enough using the following code,