---
title: "Create template"
method: POST
path: "/template"
---

# Create template

`POST /template`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/template`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/template/post.ts> (a function with typed inputs; its response is checked against the schema)

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>

## Request body

- object
  - `document_id` string, required: ID of the document to create the template from.
  - `document_name` string: Name of the template. Max: `255` characters; longer names are cut to `255`. Default: the name of the source document.

## Response `200`

The template was created from the document.

- object
  - `id` string: ID of the created template.

## Other responses

- `400`: * Wrong, expired, or missing token. * `document_id` is missing. * The document doesn't exist.
- `422`: The document belongs to another user.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
