templates

Create or update a template by name

Idempotent on name: an existing template with the same name is updated and created is false. placeholder_engine: "liquid" saves a placeholder template for the render endpoint, and converts an existing raw LaTeX template in place (promoted is true). A source containing Liquid placeholders sent without placeholder_engine is refused with liquid_placeholders_in_v1_template, because raw LaTeX would print them literally.

post/api/v1/templates

Request

  • Base URL: https://api.pressa.dev
  • URL: https://api.pressa.dev/api/v1/templates
  • Auth: none declared

Request body

namestring required
latex_contentstring

Required for a new template. Optional on an update, and when converting the saved source with placeholder_engine "liquid".

descriptionstring
instructionsstring
placeholder_engine'liquid' | 'none'

"liquid": the source contains Liquid placeholders, filled by the render endpoint. "none": raw LaTeX whose braces only look like placeholders. Omit to keep the template's current kind.

Response

Existing template updated.

Changes

No recorded changes to this operation across all 1 revision of this API.