Getting started / Core concepts

Core concepts

PDFglyph has a small vocabulary. Learn these once and the rest of the docs read quickly.

Template

A template is a reusable HTML + Handlebars document. It has a name, a type (a free label like "invoice" or "certificate"), an editable draft, and zero or more published versions. You edit the draft in the editor and publish it when it is ready.

Draft vs. published version

Each template holds exactly one mutable draft: the HTML and sample data you are currently editing. Saving the draft overwrites it.

When the draft is ready you publish it, which freezes the current draft into an immutable, numbered version (1, 2, 3, ...). A version never changes after it is created.

This separation is deliberate: the API always renders the published version, never your draft, so editing a template can never change what your live integration produces. You move to a new version only by publishing again, and you can roll back to any earlier version. A template with no published version returns template_not_published (422) from the API.

Template code

Every template has a public, developer-facing id called the code, shaped like tpl_invoice_8x2k. This is the value you pass as templateId when you generate. It is stable and never changes.

The code is distinct from the id in the dashboard URL, which is internal. Always integrate against the tpl_… code.

Generation

A generation is one call to /v1/generate: data goes in, a PDF comes out. Each generation is recorded in your history with its status, the template version that served it, and the render duration. The PDF itself is never stored. The request payload is stored only if you opt the template in.

API key

An API key authenticates requests to the public API. Keys start with sb_, are shown once at creation, stored only as a hash, and can be revoked at any time. The number of active keys you can hold depends on your plan. See Authentication.

Usage period and quota

Usage is counted per calendar month, in UTC (a period looks like 2026-06). Each plan has a monthly generation quota; reaching it returns limit_exceeded (429) until the next period. Only successful generations and loggable failures count, and a failed call never consumes quota. See Rate limits & quotas.

Plan

Your plan (Free, Starter, Pro, or Scale) sets your monthly quota, request throughput, active API-key cap, and how long generation history is retained. See Plans & limits.

Preview and fidelity

The dashboard preview renders your draft through the exact same Chromium engine, CSS, and page settings as the production API. There is no separate preview engine, so what you preview is what your users receive. Any difference between preview and production is treated as a bug. See Versioning & rollback.