Raw schema
{
"type": "object",
"properties": {
"body": {
"type": "string",
"minLength": 1,
"maxLength": 1000000,
"description": "HTML body; may use Jinja2 syntax such as {{name}}."
},
"css": {
"description": "CSS including the <style> tag.",
"type": "string",
"maxLength": 200000
},
"data": {
"description": "Values for the placeholders in body, e.g. {\"name\":\"Jo\"}.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"settings": {
"description": "PDF print settings.",
"type": "object",
"properties": {
"paper_size": {
"description": "Paper size; 'custom' needs custom_width and custom_height.",
"type": "string",
"enum": [
"Letter",
"Legal",
"Tabloid",
"Ledger",
"A0",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"custom"
]
},
"custom_width": {
"description": "Width for paper_size custom, with a unit (mm, px or cm), e.g. 210mm.",
"type": "string",
"maxLength": 20
},
"custom_height": {
"description": "Height for paper_size custom, with a unit (mm, px or cm), e.g. 297mm.",
"type": "string",
"maxLength": 20
},
"orientation": {
"description": "1 = portrait, 2 = landscape.",
"type": "string",
"enum": [
"1",
"2"
]
},
"margin_top": {
"description": "Top margin, e.g. '40' (the vendor reference says mm).",
"type": "string",
"maxLength": 10
},
"margin_right": {
"description": "Right margin.",
"type": "string",
"maxLength": 10
},
"margin_bottom": {
"description": "Bottom margin.",
"type": "string",
"maxLength": 10
},
"margin_left": {
"description": "Left margin.",
"type": "string",
"maxLength": 10
},
"print_background": {
"description": "1 = print background colors and images.",
"type": "string",
"enum": [
"0",
"1"
]
},
"displayHeaderFooter": {
"description": "Show the header and footer.",
"type": "boolean"
},
"custom_header": {
"description": "Header HTML (with its CSS).",
"type": "string",
"maxLength": 20000
},
"custom_footer": {
"description": "Footer HTML (with its CSS).",
"type": "string",
"maxLength": 20000
},
"header_font_size": {
"description": "Header font size, e.g. '9px'.",
"type": "string",
"maxLength": 10
},
"rendering_engine_version": {
"description": "Rendering engine: 153 (default) or 97 (legacy).",
"type": "string",
"enum": [
"97",
"153"
]
},
"preferCSSPageSize": {
"description": "Let the CSS @page rule set page size and orientation (engine 153 only).",
"type": "boolean"
}
}
},
"filename": {
"description": "Custom file name ending in .pdf (default: a random UUID).",
"type": "string",
"minLength": 1,
"maxLength": 150,
"pattern": "^[\\w .()-]+\\.pdf$"
},
"expiration": {
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080.",
"type": "integer",
"minimum": 0,
"maximum": 10080
},
"meta": {
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"generation_delay": {
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late.",
"type": "integer",
"minimum": 0,
"maximum": 30000
}
},
"required": [
"body"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}