How to create Team Site with REST API

Occasional Contributor

Hi Guys,


I have been searching all over the place to find information about a "simple" task I want to do with REST API. I want to create a new Team Site...


I have found this endpoint which lets me create a communication site, but why is there no such thing for Team Sites?




3 Replies
best response confirmed by Stefaan De Vreese (Occasional Contributor)

Hi Stefan, I spent ages digging around this as definitely isn't as simple as you'd think. Ultimately you need to use _api/GroupSiteManager/CreateGroupEx but I covered some of the details in my post at:

Thanks for the quick response Kevin, it works like a charm!
I also wonder why this is so badly documented, since it's a basic operation, right?

@Stefaan De Vreese 


You can create a modern team site that's not connected to a group as well as a modern communication site via the REST APIs. Here's an example. The key on the left below is to set the web template to STS#3 instead of the classic STS#0.