---
title: "Create a new template"
method: POST
path: "/v1/templates"
tags: ["Templates"]
---

# Create a new template

`POST /v1/templates`

## Request

- Base URL: `https://api.signvoy.com`
- URL: `https://api.signvoy.com/v1/templates`
- Auth: one of:
  - API key in header `X-Workspace-Id`
  - HTTP bearer
  - HTTP bearer

Reserves a template id and the initial draft version. For a PDF source (the default) the response also carries a presigned URL the browser uploads the file to. Pass a `content` body with `sourceKind: "document"` to author the template as rich text instead; there is then no file to upload, so no `uploadUrl` is returned.

## Request body

- CreateTemplateDto
  - `name` string, required: Template name
  - `fileName` string: Original PDF filename. Required for a pdf source; omit it for a document source, which has no uploaded file.
  - `pageCount` number: Number of pages. Required for a pdf source; omit it for a document source, whose length is only known once the body is rendered.
  - `content` object: Optional initial draft content (recipients/fields/rules, plus the `sourceFiles` manifest when several PDFs were merged on upload). Pass a body with `sourceKind: "document"` to author the template as rich text instead of uploading a PDF.
  - `kind` 'reusable' | 'oneoff': Whether this is a reusable template or the single-use container behind a one-off document. One-off templates are hidden from the templates list and are published implicitly when a document is created from them.

## Response `201`

- CreateTemplateResponseDto
  - `templateId` string, uuid, required: Newly created template ID
  - `draftVersionId` string, uuid, required: ID of the initial draft version
  - `uploadUrl` string, uri: Presigned PUT URL for uploading the source PDF directly to storage. Upload the PDF bytes to this URL with Content-Type: application/pdf. Absent for a document-source template, which has no file to upload — its PDF is rendered from the body at signing time.

---

[API](https://skmtc.dev/signvoy/apis/signvoy-api.md) · [All operations](https://skmtc.dev/signvoy/apis/signvoy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/signvoy/apis/signvoy-api/revisions/003cabc7cfe2?raw)
