Skip to main content
POST
Render a template

Phase

Phase 1 (Launch)

Path parameters

string
required
Template ID, e.g., tpl_abc123.

Request

object
required
Data to merge into the template. Validated against the template’s schema. Returns 422 if the data doesn’t match.
string
default:"url"
url or base64. Same behavior as POST /v1/pdfs.
string
Override the template’s default page format.
string | object
Override the template’s default margins.
boolean
Override the template’s default orientation.
object
Override the template’s default header.
Override the template’s default footer.
string
Override the template’s default compression.
boolean
default:"false"
Include debug info in the response.
object
Arbitrary metadata attached to the generated PDF.
integer
default:"30000"
Max render time in milliseconds.

Response

Same shape as POST /v1/pdfs response, with an additional template field:
object
Reference to the template used, including the exact version that was rendered. Useful for debugging when templates change.

Schema validation errors

If the data doesn’t match the template’s schema:

Example