# Move node in Wiki

This method is used to move nodes within the Wiki and supports movement across the Wiki space

**Notice**：Wiki permission requirements for the user or app represented by current access token:
- Node Edit Permission
- Original Parent Container Edit Permission
- Target Parent Container Edit Permission

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move
HTTP Method | POST
Rate Limit | [100 per minute](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | Move wiki space node(wiki:node:move)<br>View, edit, and manage Wiki(wiki:wiki)<br>View all Wiki(wiki:wiki:readonly)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Path parameters

Parameter | Type | Description
---|---|---
space_id | string | Wiki space id<br>**Example value**: "7008061636015554580"
node_token | string | Node tokens to migrate<br>**Example value**: "wikbcd6ydSUyOEzbdlt1BfpA5Yc"

### Request body

Parameter | Type | Required | Description
---|---|---|---
target_parent_token | string | No | Moved to parent token<br>**Example value**: "wikbcd6ydSUyOEzbdlt1BfpA5Yc"
target_space_id | string | No | Moved to Wiki space<br>**Example value**: "7008061636015512345"

### Request body example
```json
{
    "target_parent_token": "wikbcd6ydSUyOEzbdlt1BfpA5Yc",
    "target_space_id": "7008061636015512345"
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
node | node | Node information after moving
space_id | string | [Wiki space id](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)
node_token | string | Node token
obj_token | string | Document token, which can be determined according to obj_type whether it belongs to doc, sheet or mindnote token (for shortcuts, this field is the obj_token of the corresponding entity)
obj_type | string | Document type, for shortcuts, this field is the obj_type of the corresponding entity<br>**Optional values are**:<br>- doc：Doc<br>- sheet：Sheet<br>- mindnote：Mindnote<br>- bitable：Bitable<br>- file：File<br>- docx：Docx<br>- slides：Slides
parent_node_token | string | Node's father token. If the node is at first level, this field is empty.
node_type | string | Node type<br>**Optional values are**:<br>- origin：Entity<br>- shortcut：Shortcut
origin_node_token | string | The entity node_token corresponding to the shortcut needs to pass this value when the node is created as a shortcut
origin_space_id | string | The space id of the entity corresponding to the shortcut
has_child | boolean | Whether this node has any child nodes.
title | string | The title of this document.
obj_create_time | string | Document creation time
obj_edit_time | string | Document last edited time
node_create_time | string | Node creation time
creator | string | Node creator
owner | string | Node owner
node_creator | string | Node creator

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "node": {
            "space_id": "6946843325487912356",
            "node_token": "wikcnKQ1k3p******8Vabcef",
            "obj_token": "doccnzAaOD******8g9hprd",
            "obj_type": "doc",
            "parent_node_token": "wikcnKQ1k3p******8Vabcef",
            "node_type": "origin",
            "origin_node_token": "wikcnKQ1k3p******8Vabcef",
            "origin_space_id": "6946843325487912356",
            "has_child": false,
            "title": "title",
            "obj_create_time": "1642402428",
            "obj_edit_time": "1642402428",
            "node_create_time": "1642402428",
            "creator": "ou_b13d41c02edc52ce66aaae****abcef",
            "owner": "ou_b13d41c02edc52ce66aaae****abcef",
            "node_creator": "ou_xxxxx"
        }
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 131001 | RPC failed | Server error occurred, please try later, or take the x-tt-logid location in the header of the response and consult [oncall]((https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)).
400 | 131002 | param err | Usually, the parameter is incorrect, such as the data type does not match. Please check the **specific interface error information**. If the error is not clear, please consult [oncall]((https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)).
400 | 131003 | out of limit | Operational limits, such as number of nodes, were exceeded. See the table below.<br>- The total number of nodes in the original/target wiki space does not exceed 400,000.<br>- The original/target wiki space directory tree does not exceed 50 layers.<br>- The number of single-layer nodes under the destination parent node does not exceed 2000.<br>- The number of single mobile nodes (with child nodes) does not exceed 2000.
400 | 131004 | invalid user | Illegal user, please consult [oncall]((https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)).
400 | 131005 | not found | No relevant data was found, for example id does not exist. Reference for related error information:<br>- member not found: The user is not a member (admin) of the wiki space and cannot be deleted.<br>- identity not found: userid does not exist, cannot add/remove members.<br>- space not found: wiki space does not exist<br>- node not found: node does not exist<br>- document not found: document does not exist<br>Please consult [oncall]((https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)) when the error is unclear.
400 | 131006 | permission denied | Permission denied, please refer to the relevant error information:<br>- wiki space permission denied: wiki space permission authentication failed, you need to become a wiki space administrator (member).<br>- node permission denied: The document node permission authentication failed, the read operation needs to have the node view permission, and the write operation (create, move, etc.) needs to have the node container editing permission.<br>- no source parent node permission: Container editing permission of the original parent node is required.<br>- no destination parent node permission: Container editing permission on the destination parent node are required. If you move to wiki space, you need to become a wiki space administrator (member).<br>**Note**: When an application accesses or manipulates a document, in addition to applying for API permissions, it also needs to authorize reading, editing, or administrative permissions for specific document resources.<br>Please refer to the following steps:<br>1. **When encountering insufficient resource permissions**: See [How to authorize an application to access wiki space documentation resources](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/wiki-qa#a40ad4ca).<br>2. **You can also directly add an app as a wiki space administrator (member)**: See [How to add an app as a wiki space administrator (member) ](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/wiki-qa#b5da330b).<br>3. **If it cannot be solved or the error message is not clear**: Please consult [technical support](https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952).
400 | 131007 | internal err | Server internal error, take the x-tt-logid location in the header of the return response and consult [oncall]((https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)).

