---
title: "Create template"
url: "https://docs.signnow.com/docs/template/operations/create-template"
type: "endpoint"
section: "template"
slug: "template/operations/create-template"
method: "POST"
path: "/template"
operation_id: "create-template"
authorization: "bearer"
---

# Create template

`POST /template`

This endpoint allows API users to create a template by flattening an existing document.

**Template** - an entity that holds the structure of a document and serves for generating its copies.

SignNow users cannot make a template without uploading a document first. They can generate (clone) a new instance of a document from it. 
 
Recipients always sign a document generated from the template, never the template itself. Each generated document can be customized for its recipient, for example prefilled with account info. Templates can be shared within a team and edited only by the owner.

For the full flow, from creating the template to sending the generated document for signature, see [Documents, doc groups, and templates](/docs/entities).

For more information, check out our video tutorial.

<details open>

**<summary>Video tutorial</summary>**

<sub><sup>Note: The design shown in the video is outdated, but the flow is still accurate. You can go ahead and follow the steps as demonstrated.</sup></sub>

[Video tutorial](https://www.youtube.com/watch?v=WjohB0P5S8M)

</details>

## Authorization

bearer

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "document_id",
    "document_name"
  ],
  "properties": {
    "document_id": {
      "type": "string",
      "description": "ID of the document which is the source of a template"
    },
    "document_name": {
      "type": "string",
      "description": "the new template name"
    }
  }
}
```

**Example** (`application/json`)

```json
{
  "document_id": "5eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "document_name": "Sample template"
}
```

## Responses

### 200

**Example** (`application/json`)

```json
{
  "id": "ceXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
```

## Code Examples

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

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/template" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"document_id": "5eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "document_name": "Sample template"}'
```

---
*Full reference: https://docs.signnow.com/docs/template/operations/create-template*
