---
title: "Create Template from File Upload"
method: POST
path: "/public/v1/templates?upload"
tags: ["Templates"]
---

# Create Template from File Upload

`POST /public/v1/templates?upload`

## Request

- Base URL: `https://api.pandadoc.com`
- URL: `https://api.pandadoc.com/public/v1/templates?upload`
- Auth: one of:
  - API key in header `Authorization`
  - OAuth 2
    - Authorization code: `https://app.pandadoc.com/oauth2/authorize`
    - Token URL: `https://api.pandadoc.com/oauth2/access_token`
- TypeScript: <https://skmtc.dev/pandadoc/apis/pandadoc-public-api/docs/public/v1/templates%3Fupload/post.ts> (a function with typed inputs; its response is checked against the schema)

This asynchronous endpoint allows users to create a new template by uploading a file.

The uploaded file is processed in the background to generate the template.
The maximum allowable file size for upload is 100 MB.
Field tags and form fields are not supported yet.

Once the file is uploaded, the processing will happen asynchronously, and users need to check [the status of the template](https://developers.pandadoc.com/reference/template-status) creation.

## Query parameters

- `fields` string[]

## Request body `multipart/form-data`

- CreateTemplateWithUploadRequest
  - `file` string, binary: Binary PDF/DocX/RTF File.
  - `data` object: JSON as a multipart/form-data string.
    - `editable` boolean: Only applicable when creating a template from a DOCX file. When `true`, the DOCX is converted into editable content, so the resulting template can be edited.
    - `name` string: The name of the template.
    - `folder_uuid` string: The ID of the folder where the created template should be stored.
    - `owner` object: You can set an owner of a template as an `email` or `membership_id`.
      - `membership_id` string
      - `email` string, email
    - `metadata` object, nullable: You can pass arbitrary data in the key-value format to associate custom information with a template. This information is returned in any API requests for the template details by id.
    - `tokens` object[]: Create or initialize multiple CUSTOM variables with their values using tokens/values list. Template's predefined variables are read-only. Any attempts to do so will be ignored.
      - `name` string, required
      - `value` string, required

## Response `201`

OK

- TemplateCreateResponse
  - `id` string
  - `name` string
  - `date_created` string, date-time
  - `date_modified` string, date-time
  - `version` string
  - `content_date_modified` string, date-time

## Other responses

- `400`: Bad Request
- `401`: Authentication error
- `429`: Too Many Requests

## Changes

- **2026-11-03** `b9a306b1a421`: 1 info
  - added the new optional request property `data/allOf[#/components/schemas/CreateTemplateRequest]/editable`

[Operation history](https://skmtc.dev/pandadoc/apis/pandadoc-public-api/changes/public/v1/templates%3Fupload/post.md)

---

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