> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# moveFolder

> Moves a folder and everything under it to a new parent folder. The folder moves at once; for a large subtree a task rewrites the entries' paths, and `queuedTaskId` returns its id. The root folder can't be moved.



**mutation** `moveFolder(input: MoveFolderInput!): MoveFolderPayload!`

## Arguments

**`input`**: `MoveFolderInput!` (required)

## Returns

`MoveFolderPayload!`

**`errors`**: `[MoveFolderError!]`

---

**`folderMove`**: `FolderMove`

## Examples

```graphql Mutation
mutation MoveFolder($input: MoveFolderInput!) {
  moveFolder(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    folderMove {
      folder {
        activeTask {
          __typename
        }
        children {
          __typename
        }
        createdAt
        createdByUser
        dataSource {
          __typename
        }
        dataSourceId
      }
      queuedTaskId
    }
  }
}
```

```json Variables
{
  "input": {
    "id": "id",
    "newParentFolderId": "id"
  }
}
```

```json Response
{
  "data": {
    "moveFolder": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "folderMove": {
        "folder": {
          "activeTask": {
            "__typename": "QueuedTask"
          },
          "children": {
            "__typename": "ChildrenConnection"
          },
          "createdAt": "value",
          "createdByUser": "value",
          "dataSource": {
            "__typename": "DataSource"
          },
          "dataSourceId": "id"
        },
        "queuedTaskId": "id"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.