public templates

Fill a public template with JSON data and compile it to a PDF

Fills the template, then runs exactly the compile endpoint: authentication is OPTIONAL with the same anonymous tier and daily limit, the same plan limits, and the same success and failure bodies. The designs of one document take the same data (the five resume designs, as do the packing slip and the delivery note). Data that does not match the schema is a 422 schema_validation_failed listing missing_fields and type_errors; it never reaches the compiler and costs no quota.

post/api/v1/public_templates/{slug}/render

Request

  • Base URL: https://api.pressa.dev
  • URL: https://api.pressa.dev/api/v1/public_templates/{slug}/render
  • Auth: one of:
    • none
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

slugstring required

Request body

dataobject required

Values for the template's fields; see GET /api/v1/public_templates/{slug}.

colorstring

Optional: one of the template's colors from the list (e.g. navy). Left out, the template's default colour. An unknown colour is a 422 invalid_color listing the valid ones.

Response

PDF produced.

job_idstring uuid required
pdf_urlstring uri required

Signed URL. Fetchable with no credentials until it expires.

expires_atstring date-time
pagesinteger required

Pages in the PDF at pdf_url. For a preview this is what was delivered; total_pages is what the document has.

compilation_time_msinteger
assets_countinteger
studio_urlstring uri

Browser editor link. Absent for anonymous compiles.

anonymousboolean

Present and true when the compile used the keyless tier.

remaining_todayinteger

Anonymous tier only.

notestring

Anonymous tier only. Human- and agent-readable upgrade guidance.

usageobject

Monthly counters for accounts; daily counters for the anonymous tier.

quota_graceboolean

Present and true when this compilation exceeded the plan's monthly limit and drew on the paid-plan grace buffer. Grace compilations are not charged.

grace_remaininginteger

Compilations left in the grace buffer before requests start failing.

warningstring

Present with quota_grace (capacity is about to run out) and with preview (what was delivered and which plan covers the whole document). Human- and agent-readable; relay it.

previewboolean

Present and true when the document exceeded the plan's page or source-size limit. The PDF at pdf_url is what the plan delivers of it. Accounts only; anonymous callers get 413/422 instead.

truncatedboolean

With preview: true when the PDF holds only the first pages of a total_pages document, false when the source was over the plan's size limit but every page fit.

total_pagesinteger

With preview: how many pages the whole document has. pages is how many were delivered.

plan_required'free' | 'starter' | 'pro' | 'business' nullable

With preview: the smallest plan whose page and source-size limits cover the whole document. Null when even Business does not.

upgrade_urlstring uri

Changes

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