---
title: "Copy doc group template"
url: "https://docs.signnow.com/docs/document-group-template/operations/post-v2-document-group-templates-doc_group_template_id-copy"
type: "endpoint"
section: "document-group-template"
slug: "document-group-template/operations/post-v2-document-group-templates-doc_group_template_id-copy"
method: "POST"
path: "/v2/document-group-templates/{doc_group_template_id}/copy"
operation_id: "post-v2-document-group-templates-doc_group_template_id-copy"
authorization: "bearer"
---

# Copy doc group template

`POST /v2/document-group-templates/{doc_group_template_id}/copy`

This endpoint allows users to copy the document group template. As a result, users get a copy of the doc group template and copies of all the templates in it.

## Authorization

bearer

## Path Parameters

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

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the new document group template copy.",
      "x-stoplight": {
        "id": "qj0g6c506l39t"
      }
    },
    "folder_id": {
      "type": "string",
      "description": "ID of the folder where the new doc group template copy must be saved. Must be saved to a Templates folder or any of its sub-folders.",
      "x-stoplight": {
        "id": "v1rh5s6bmvr64"
      }
    }
  }
}
```

## Responses

### 202

Successfully copied document group template

### 400

* Request with any of cases:

- invalid token of user
- expired token of user
- empty header
- authorization = null
- authorization without value

* Invalid payload
* Incorrect `name` attribute
* Empty `name` attribute
* Unsupported symbol in the `name` value
* `name` value length limits
* Incorrect `folder_id` data type
* Invalid ID in `folder_id`
* Not available type of a folder given
* Not available name of new document group template

**Example** (`Invalid payload`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Invalid payload"
    }
  ]
}
```

**Example** (`Authorization issues`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`Empty `name` attribute`)

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

**Example** (`Invalid ID in `folder_id``)

```json
{
  "errors": [
    {
      "code": 23003015,
      "message": "The `folder_id` field value must be valid unique_id."
    }
  ]
}
```

**Example** (``name` value length limits`)

```json
{
  "errors": [
    {
      "code": 23003013,
      "message": "The `name` must not exceed 255 chars."
    }
  ]
}
```

**Example** (`Incorrect `folder_id` data type`)

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

**Example** (`Incorrect data type for `name` `)

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

**Example** (`Not available type of a folder given`)

```json
{
  "errors": [
    {
      "code": 23003019,
      "message": "Document Group Template could be created in folder or sub-folders of Templates only."
    }
  ]
}
```

**Example** (`Unsupported symbol in the `name` value`)

```json
{
  "errors": [
    {
      "code": 23003012,
      "message": "Unsupported symbol at `name` field value. Allowed name can only include letters, numbers, and (_ - . & ; ` ' \u201d \u201d () \u00bf \u00a1) characters"
    }
  ]
}
```

**Example** (`Not available name of new document group template`)

```json
{
  "errors": [
    {
      "code": 23003021,
      "message": "The name of new document group template must not be empty."
    }
  ]
}
```

### 403

* User is not owner of the doc group template
* Document group template not active
* User is not owner of the folder

**Example** (`User is not owner of the folder`)

```json
{
  "errors": [
    {
      "code": 23003018,
      "message": "Access denied to the folder."
    }
  ]
}
```

**Example** (`Document group template not active`)

```json
{
  "errors": [
    {
      "code": 23003020,
      "message": "Access denied to the document group template."
    }
  ]
}
```

**Example** (`User is not owner of the doc group template`)

```json
{
  "errors": [
    {
      "code": 23003016,
      "message": "The user is not owner of the `%s` document group template."
    }
  ]
}
```

### 404

* Document group template not found.
* Not permitted document group template

**Example** (`Document group template not found.`)

```json
{
  "errors": [
    {
      "code": 23001014,
      "message": "Document Group Template `%s` not found"
    }
  ]
}
```

**Example** (`Not permitted document group template`)

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

## Code Examples

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

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/v2/document-group-templates/{doc_group_template_id}/copy" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

---
*Full reference: https://docs.signnow.com/docs/document-group-template/operations/post-v2-document-group-templates-doc_group_template_id-copy*
