---
title: "Create doc group template from doc group"
url: "https://docs.signnow.com/docs/document-group-template/operations/post-v2-document-groups-document_group_uid-document-group-template"
type: "endpoint"
section: "document-group-template"
slug: "document-group-template/operations/post-v2-document-groups-document_group_uid-document-group-template"
method: "POST"
path: "/v2/document-groups/{doc_group_id}/document-group-template"
operation_id: "post-v2-document-groups-document_group_uid-document-group-template"
authorization: "bearer"
---

# Create doc group template from doc group

`POST /v2/document-groups/{doc_group_id}/document-group-template`

This endpoint allows API users to create a new document group template from a document group in any status.

As a result, user gets one document group template and separate templates from each document in the document group.

To collect signatures, create a document group from the template with [Create doc group from template](/docs/document-group-template/operations/post-v2-document-group-templates-unique_id-document-group), then send that group. For the full flow, see [Documents, doc groups, and templates](/docs/entities).

## Authorization

bearer

## Path Parameters

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

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name for a new Document group template.",
      "x-stoplight": {
        "id": "8k87jesg0p3i6"
      }
    },
    "folder_id": {
      "type": "string",
      "description": "The folder where to save the new Document group template. Must be saved to a Templates folder or any of its sub-folders.",
      "x-stoplight": {
        "id": "9265xix62sar1"
      }
    }
  }
}
```

## Responses

### 202

Document group template copy has been scheduled

### 400

* Authorization issues: invalid token of user, expired token of user, empty header, authorization = null, authorization without value
* Incorrect type of name field
* Unsupported symbols in the name field
* Length of the name field is too long
* Incorrect type of folder_id field
* Incorrect value of folder_id field
* Empty name field
* With non-Template(or its sub-folder) folder_id

**Example** (`Empty name field`)

```json
{
  "code": 23003006,
  "message": "The `name` field must not be empty."
}
```

**Example** (`Authorization issues`)

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

**Example** (`Incorrect type of name field`)

```json
{
  "code": 23003003,
  "message": "The `name` field must be a string."
}
```

**Example** (`Incorrect type of folder_id field`)

```json
{
  "code": 23003001,
  "message": "The `folder_id` field must be a string."
}
```

**Example** (`Incorrect value of folder_id field`)

```json
{
  "code": 23003001,
  "message": "The `folder_id` field value must be valid unique_id."
}
```

**Example** (`Length of the name field is too long`)

```json
{
  "code": 23003005,
  "message": "The `name` must not exceed 255 chars."
}
```

**Example** (`Unsupported symbols in the name field`)

```json
{
  "code": 23003004,
  "message": "Unsupported symbol at `name` field value. Allowed symbols: A-Z, a-z, 0-9, '_', '.', '-', ' '."
}
```

**Example** (`With non-Template(or its sub-folder) folder_id`)

```json
{
  "code": 23003009,
  "message": "Document Group Template could be create in folder or sub-folders of Templates only."
}
```

### 403

* Forbidden access to the Document Group
* Forbidden access to the provided folder

**Example** (`Forbidden access to the Document Group`)

```json
{
  "code": 13020001,
  "message": "You do not own this DocumentGroup"
}
```

**Example** (`Forbidden access to the provided folder`)

```json
{
  "code": 23003008,
  "message": "User don`t have access to folder."
}
```

### 404

* Folder does not exist
* Document Group does not exist or is deleted

**Example** (`Folder does not exist`)

```json
{
  "code": 23003007,
  "message": "User folder not found."
}
```

**Example** (`Document Group does not exist or deleted`)

```json
{
  "code": 23001015,
  "message": "Document Group `{dg_uid}` 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-groups/{doc_group_id}/document-group-template" \
  -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-groups-document_group_uid-document-group-template*
