---
title: "Move API Package Documentation"
method: POST
path: "/v3/api-packages/{packageId}/documents/{documentId}/move"
tags: ["API Package Documentation"]
---

# Move API Package Documentation

`POST /v3/api-packages/{packageId}/documents/{documentId}/move`

This api allows the user to move a document within the document tree using the parameters parent_document_id and index. If parent_document_id is not provided, the document will be placed at the top level of the document tree. index represents a zero-indexed document order relative to its siblings under the same parent. For example, if we want to put the document at top level in first position we would send parent_document_id: null and index: 0. This api also supports using a negative index to count backwards from the end of the document list, which means you can put the document in last position by using index: -1.

## Request body

- MoveDocumentRequestPayload — move document request payload
  - `parent_document_id` string, uuid — parent document id
  - `index` integer — index of the document in the parent document's children

## Response `204`

Document for the API Package was moved successfully.

## Other responses

- `401` — ApiUnauthorized
- `403` — ApiForbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/kong/apis/konnect-api-go-sdk.md) · [All operations](https://skmtc.net/kong/apis/konnect-api-go-sdk/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api-go-sdk/versions/0261aef4b1e2/schema)
