Raw schema
{
"type": "object",
"properties": {
"source": {
"type": "object",
"description": "What to render. Provide exactly one of: html, url, or (template|templateId) with data.",
"properties": {
"type": {
"type": "string",
"enum": [
"html",
"url",
"template"
],
"description": "Source kind: 'html' for a raw HTML string, 'url' for a public web page, 'template' for a template filled with data."
},
"html": {
"type": "string",
"description": "Raw HTML to render (when type is 'html')."
},
"url": {
"type": "string",
"description": "Public URL to render (when type is 'url'). Private/internal addresses are blocked."
},
"template": {
"type": "string",
"description": "Inline HTML template with {{ placeholders }} (when type is 'template')."
},
"templateId": {
"type": "string",
"description": "ID of a template stored on your account (alternative to an inline template)."
},
"data": {
"type": "object",
"description": "Values bound into the template's {{ placeholders }}.",
"additionalProperties": true
}
},
"required": [
"type"
]
},
"options": {
"type": "object",
"description": "Optional page and print settings.",
"properties": {
"format": {
"type": "string",
"enum": [
"A4",
"A3",
"Letter",
"Legal",
"Tabloid"
],
"description": "Paper size. Defaults to A4."
},
"landscape": {
"type": "boolean",
"description": "Use landscape orientation. Defaults to false."
},
"margin": {
"type": "string",
"description": "Page margin, e.g. '20mm' or '1in'."
},
"printBackground": {
"type": "boolean",
"description": "Render background colors and images. Defaults to true."
}
}
},
"idempotencyKey": {
"type": "string",
"description": "A stable key (e.g. an invoice id). Repeat calls with the same key return the stored result instead of re-rendering or re-billing."
}
},
"required": [
"source"
]
}