Sp.Sites.createOneSite
POST/clients/:clientId/sp/sites/:siteTemplate
The function createSite
asynchronously creates a SharePoint site based on the specified template
using provided clients and options.
Request
Responses
- 200
The createSite
function returns a Promise that resolves to either an IGraphSite
object or a MiddlewareError
object. The function first checks if a site with the specified URL
already exists using the openSpClient.site.exists
method. If the site exists, it retrieves and
returns the site using SpSiteController.getOneSiteByUrl
.