---
title: "Create a new version for an existing template"
method: POST
path: "/v1/template/{id}"
tags: ["Templates"]
---

# Create a new version for an existing template

`POST /v1/template/{id}`

## Path parameters

- `id` string, required

## Request body

- TemplateRequest
  - `html` string, required — HTML to render for the template. Use Handlebars placeholders for values that will be substituted when an image is rendered. Must be non-empty, contain at least one Handlebars placeholder, and compile as valid Handlebars.
  - `name` string, nullable — The name of the template, used to identify it in your account. Maximum: 64 characters.
  - `description` string, nullable — An optional description of the template for your reference. Maximum: 1024 characters.
  - `css` string, nullable — CSS used to style images rendered from the template. Handlebars expressions are not supported in CSS; put dynamic CSS in the HTML instead.
  - `device_scale` number, double, nullable — Adjusts the pixel ratio used for the screenshot. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1.
  - `google_fonts` string, nullable — Google fonts to load. Separate multiple fonts with a pipe, such as 'Roboto|OpenSans', and set font-family in the CSS to use them.
  - `max_wait_ms` integer, nullable — Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content. Minimum: 500. Maximum: 10000 and subject to the account plan limit.
  - `ms_delay` integer, nullable — Adds extra time in milliseconds before taking the screenshot so JavaScript can execute. Minimum: 0. Maximum: 10000.
  - `render_when_ready` boolean, nullable — Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.
  - `viewport_height` integer, nullable — Sets the height of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
  - `viewport_width` integer, nullable — Sets the width of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
  - `disable_twemoji` boolean, nullable — Disables the Twemoji fallback and renders emoji using native fonts instead.
  - `color_scheme` unknown
  - `timezone` string, nullable — Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.
  - `viewport_mobile` boolean, nullable — Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.
  - `viewport_landscape` boolean, nullable — Specifies whether the emulated viewport is in landscape orientation.
  - `viewport_touch` boolean, nullable — Specifies whether the emulated viewport supports touch events.
  - `media_type` unknown
  - `proxy_id` string, nullable — Specifies which configured organization proxy to use when rendering.
  - `storage_destination_id` string, nullable — Specifies which configured organization storage destination receives the rendered image.
  - `jumbo_max_height` integer, nullable — Maximum height of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_width. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
  - `jumbo_max_width` integer, nullable — Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
  - `transparent_background` boolean, nullable — Specifies whether the image is rendered with a transparent background.

## Response `200`

OK

- TemplateCreateResponse
  - `template_id` string
  - `template_version` integer

## Other responses

- `400` — Bad Request
- `429` — Too Many Requests

---

[API](https://skmtc.dev/htmlcsstoimage/apis/html-css-to-image-api.md) · [All operations](https://skmtc.dev/htmlcsstoimage/apis/html-css-to-image-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/htmlcsstoimage/html-css-to-image-api/revisions/07d679e7b124/schema)
