Hi @zameer_abbas
You can create pages under specific rootPath using editable templates by below mentioned groovy script.
def rootPagePath = "/content/we-retail/us/en/equipment/";
PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
for(int index=0; index < 5; index++){
pageManager.create(rootPagePath,"test"+index,"/conf/we-retail/settings/wcm/templates/content-page","Test Page Title"+index);
}
Groovy console successful execution of code :

Pages created after executing script :

-Manjunath