POST/pages/move-to-space

Move a page to a different space

Moves a page and all its descendants to a different space, where the page becomes a root-level page. Supply pageId and the destination spaceId to identify the page and its new space.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 body fields

Page move request specifying the page and destination space.

pageIdstringrequired
ID of the page to move. All child pages are moved with it.
spaceIdstringrequired
ID of the destination space.

4 status codes
200Returns the moved page.
dataobjectoptional
statusintegeroptional
successbooleanoptional
400Returned when the page is already in the destination space.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the request is forbidden.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the page is not found.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 400 is returned when the page is already in the destination space, a 403 when the request is forbidden, and a 404 when the page is not found. Both pageId and spaceId are required.