Templates

Create a new template

Changed on
post/v1/template

Request

  • Base URL
    https://hcti.io
  • Auth
    HTTP basic

Request body

htmlstring 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.

namestring nullable

The name of the template, used to identify it in your account. Maximum: 64 characters.

descriptionstring nullable

An optional description of the template for your reference. Maximum: 1024 characters.

cssstring nullable

CSS used to style images rendered from the template. Handlebars expressions are not supported in CSS; put dynamic CSS in the HTML instead.

google_fontsstring 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.

render_when_readyboolean nullable

Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.

selectorstring nullable

A CSS selector for an element in the HTML. We’ll crop the image to this specific element.

disable_twemojiboolean nullable

Twemoji is enabled by default for images rendered from the template. Set true to disable automatic emoji replacement. Omitted, null, or false keeps Twemoji enabled.

color_schemeunknown
timezonestring nullable

Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.

viewport_mobileboolean nullable

Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.

viewport_landscapeboolean nullable

Specifies whether the emulated viewport is in landscape orientation.

viewport_touchboolean nullable

Specifies whether the emulated viewport supports touch events.

media_typeunknown
proxy_idstring nullable

Specifies which configured organization proxy to use when rendering.

storage_destination_idstring nullable

Specifies which configured organization storage destination receives the rendered image.

transparent_backgroundboolean nullable

Specifies whether the image is rendered with a transparent background.

Response

OK

template_idstring

Changes