---
title: "Move a page to a new location relative to a target page"
method: PUT
path: "/wiki/rest/api/content/{pageId}/move/{position}/{targetId}"
tags: ["Content - children and descendants"]
---

# Move a page to a new location relative to a target page

`PUT /wiki/rest/api/content/{pageId}/move/{position}/{targetId}`

Move a page to a new location relative to a target page:

* `before` - move the page under the same parent as the target, before the target in the list of children
* `after` - move the page under the same parent as the target, after the target in the list of children
* `append` - move the page to be a child of the target

Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI
because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions
when the `targetId` is a top-level page.

## Path parameters

- `pageId` string, required
- `position` 'before' | 'after' | 'append', required
- `targetId` string, required

## Response `200`

Page was successfully moved

- object
  - `pageId` string

## Other responses

- `400` — Returned if; - A page already exists in the target space with the same name. User is advised to rename page before moving. - The move would create a parent-child loop (page becomes a descendant and ancestor of itself) - The page has permission restrictions that the user does not have permission to create in the target space. User is advised to remove restrictions before moving.
- `403` — Returned if; - User does not have permission to remove page from current space - User does not have permission to create a page in target space
- `404` — Returned if; - The id or targetId refer to non-existent pages

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/versions/70088490f406/schema)
