I need to create modern web page with image and text web parts using sharepoint API. Is it possible to do that?
I tried with below API which creates samplePage.aspx inside Site pages library but when i tried to open it it gives me error.
https://domain-url/sites/SiteName/_api/web/GetFolderByServerRelativeUrl('/sites/SiteName/SitePages')/Files/AddTemplateFile(urlOfFile='samplePage.aspx',templateFileType=3)
Can someone please help me on this.