---
title: "Create a template with its first variant"
method: POST
path: "/templates"
---

# Create a template with its first variant

`POST /templates`

## Request body

- CreateTemplate
  - `name` string, required
  - `description` string
  - `type` 'image' | 'video'
  - `width` integer
  - `height` integer
  - `background` string
  - `variant` object
    - `name` string
    - `document` object
  - `metadata` object

## Response `201`

Template created

## Other responses

- `401` — API key is missing or invalid
- `403` — API key does not have the required scope
- `422` — Invalid template request

---

[API](https://skmtc.net/duply/apis/duply-api.md) · [All operations](https://skmtc.net/duply/apis/duply-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/duply/duply-api/revisions/474b3757c7af/schema)
