Below is the code in which you have to send
parameter :
strSiteURL: Site URL on which you have to create List using template.
strTemplateName: Template name of which you have to create list
strListName: Name of the list.
public void CreateListFromTemplate(string strSiteURL,string strTemplateName,string strListName)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite oSPsite = new SPSite(strDestinationURL))
{
oSPsite.AllowUnsafeUpdates = true;
using (SPWeb oSPWeb = oSPsite.OpenWeb())
{
oSPWeb.AllowUnsafeUpdates = true;
SPListTemplateCollection lstTemp = oSPsite.GetCustomListTemplates(oSPWeb);
SPListTemplate template = lstTemp[strTemplateName];
oSPWeb.Lists.Add(txtListName.Text, "Description", template);
Guid listId = oSPWeb.Lists.Add(txtListName.Text, "Description", template);
SPList mylist = oSPWeb.Lists[listId];
mylist.OnQuickLaunch = false;
mylist.Update();
oSPWeb.AllowUnsafeUpdates = false;
}
oSPsite.AllowUnsafeUpdates = false;
}
});
}

Gowtham RajamanickamPosted Apr 10, 2016, 8:21 AM
good one
adwaith reddyPosted Jun 16, 2015, 10:18 AM
Can we set the limit of the items to be created in the list every time we create a list based on the custom template?
Julián Andrés Henao TabordaPosted Sep 1, 2014, 6:10 PM
Is there any way to do it with api rest?