To create a page, execute a POST request to the following endpoint:
POST
{baseurl}/api/default/pages
Depending on what type of page you want to create, you pass different parameters in the request body. The type of the created page is determined by the request payload.
ParentId
TemplateId
Sample request
POST http://mysite.com/api/default/pages
To create a .NET Core page, you must base it on a .NET Core template. To do this, use one of the following properties:
TemplateName
NetCore.Default
To create a redirect page, you must set the PageType property to Redirect. You must also specify where the page should redirect, using the RedirectPage object, which holds the redirect page settings.
PageType
Redirect
RedirectPage
To create a page that redirects to an external URL, set the RedirectUrl property of the RedirectPage object to the URL of the external page where you want to redirect.
RedirectUrl
To create a page that redirects to another Sitefinity CMS page, set the NodeId property of the RedirectPage object to the ID of the Sitefinity CMS page where you want to redirect.
NodeId
Sample response
When you create the first translation of an item, you are able to choose whether all translations of a page should be in sync, or whether you want to create a split translation of a page that will have different layout and widgets. For more information, see Translate pages.
To create a page translation, execute a PATCH request to the following endpoint:
{baseurl}/api/default/pages({pageId})?sf_culture={translate_to_culture}
Where:
{pageId}
{translate_to_culture}
You determine whether the page will be kept in sync with all translations or will be split from the original page, by passing the EnableSync or EnableSplit parameters in the request.
EnableSync
EnableSplit
The CopyFrom parameter controls whether you want to copy the page contents from another translation, or whether you want to start from scratch. If you want to start from scratch, omit the CopyFrom parameter. Otherwise, set its value to the culture of the translation that you want to copy from.
CopyFrom
PATCH http://mysite.com/api/default/pages(917ef635-3099-4a8e-bbd0-298191a4b547)?sf_culture=de
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important