Write a page’s element tree from the REST API
The Create Page and Update Page endpoints now accept an optional elements field, so you can set a page’s element tree when you create or update the page.
- Create: if you leave out
elements, the page starts with an empty root. - Update: if you send
elements, it replaces the page’s entire tree. - Tree shape: the root node has
typeset to./components/Root/index.js, akey(a UUID that’s unique within the tree), andprops. This is the same shape thatexpand=elementsreturns on Get Page. - Beta: this is part of the Resource APIs project, which is in Beta and may change. Requests return
403until the feature is enabled for your site or workspace.
Error response changes
- A pathname that’s invalid or already in use now returns
400instead of409. A400is also returned for an invalid element tree. - Create Page returns
404if the site doesn’t exist. Update Page returns404if the page or its site doesn’t exist.
For details, see Create Page and Update Page.