---
title: "Move document group"
url: "https://docs.signnow.com/docs/document-group/operations/post-v2-document-groups-document_group_id-move"
type: "endpoint"
section: "document-group"
slug: "document-group/operations/post-v2-document-groups-document_group_id-move"
method: "POST"
path: "/v2/document-groups/{document_group_id}/move"
operation_id: "post-v2-document-groups-document_group_id-move"
authorization: "bearer"
---

# Move document group

`POST /v2/document-groups/{document_group_id}/move`

This endpoint allows users to move a document group to another folder. When a document group is moved, all its documents are moved to the same folder except documents in the Deleted folder (Deleted from Trash) and documents that are located in the Shared folders.

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_group_id` | string | Yes | ID of the document group |

## Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Content-Type` | string | No | application/json |

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "folder_id"
  ],
  "properties": {
    "folder_id": {
      "type": "string",
      "example": "2cb6ea1d58a84bc085b3ef2c880378d35e4881b5",
      "description": "ID of the folder to move the document group to. Allowed folder types: \r\n\r\n* Documents and custom folders\r\n* Archive and its custom folders\r\n* Shared Documents folders ",
      "x-stoplight": {
        "id": "97neqkaeuy8wm"
      }
    },
    "with_shared_documents": {
      "type": "boolean",
      "default": false,
      "description": "Whether to move shared documents that are in this document group. With this parameter, a document group can only be moved to trash.",
      "x-stoplight": {
        "id": "qf1kwsujca7vi"
      }
    }
  }
}
```

**Example** (`Correct request`)

```json
{
  "folder_id": "2cb6ea1d58a84bc085b3ef2c880378d35e4881b5"
}
```

**Example** (`Correct request to move DG to trash`)

```json
{
  "folder_id": "2cb6ea1d58a84bc085b3ef2c880378d35e4881b5",
  "with_shared_documents": true
}
```

## Responses

### 204

Success, no content

### 400

* `folder_id` is not a string
* Incorrect `folder_id`
* Empty `folder_id`
* The user does not have a folder with this ID
* `with_shared_documents` is not a boolean
* `with_shared_documents` is TRUE and the folder is not Trash 

**Example** (`Empty folder_id`)

```json
{
  "errors": [
    {
      "code": 13009019,
      "message": "The `folder_id` field must not be empty. "
    }
  ]
}
```

**Example** (`Folder not Trash`)

```json
{
  "errors": [
    {
      "code": 13009026,
      "message": "The `7c5409cce69843e698e793162d103e2b79a0bcf0` folder is not support shared documents."
    }
  ]
}
```

**Example** (`No such folder_id`)

```json
{
  "errors": [
    {
      "code": 13009017,
      "message": "User folder `4ab6ea1d58a84bc085b3ef2c880w78d35e4881b5` is not found."
    }
  ]
}
```

**Example** (`Incorrect folder_id`)

```json
{
  "errors": [
    {
      "code": 13009003,
      "message": "The `folder_id` field value is invalid."
    }
  ]
}
```

**Example** (`folder_id not string`)

```json
{
  "errors": [
    {
      "code": 13009002,
      "message": "The `folder_id` field must be a string."
    }
  ]
}
```

**Example** (`with_shared_documents not boolean`)

```json
{
  "errors": [
    {
      "code": 13009025,
      "message": "The `with_shared_documents` field must be a bool."
    }
  ]
}
```

### 403

* The user is not an owner of the document group.
* The folder is not owned by or shared with the user's team.
* The user does not have permissions to move document groups to this folder.
* To move a document group, a user must be its owner. To move a document group that is located in the Shared folder, a user must be a team admin.
* This folder does not support document groups in correction state.
* It is forbidden to move this document group to the Deleted folder.

**Example** (`Team issue`)

```json
{
  "errors": [
    {
      "code": 13009029,
      "message": "The `%s` folder is not owned folder or shared folder of Team where user is member."
    }
  ]
}
```

**Example** (`Ownership issue`)

```json
{
  "errors": [
    {
      "code": 13009028,
      "message": "Only owner of document group or Team admin (if document group is located in Shared Folder) can move document group."
    }
  ]
}
```

**Example** (`Permission error`)

```json
{
  "errors": [
    {
      "code": 13009018,
      "message": "User Folder permissions is not executable."
    }
  ]
}
```

**Example** (`User doesn't own DG`)

```json
{
  "errors": [
    {
      "code": 13009006,
      "message": "User is not owner of `64cfc09a50c6852e5cc4bb427c33cf9b5ee4620a` document group."
    }
  ]
}
```

**Example** (`Moving to Deleted forbidden`)

```json
{
  "errors": [
    {
      "code": 13009030,
      "message": "Move to `Deleted` folder is not allowed"
    }
  ]
}
```

**Example** (`Document group in correction state`)

```json
{
  "errors": [
    {
      "code": 13009031,
      "message": "The `%s` folder does not support document group in correction state."
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/v2/document-groups/{document_group_id}/move" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"folder_id": "2cb6ea1d58a84bc085b3ef2c880378d35e4881b5"}'
```

---
*Full reference: https://docs.signnow.com/docs/document-group/operations/post-v2-document-groups-document_group_id-move*
