Render (Templates)

Render a saved React JSX template with dynamic data. Templates are managed in the dashboard or via the templates API.

POST/v1/render

Request

FieldTypeDescription
template requiredstringTemplate name
data requiredobjectProps passed to the React component
engine"rust" | "puppeteer"Rendering engine (default: rust)
testbooleanTest mode (free, watermarked)
optionsobjectPage size, margins, etc.
hostingobjectEnable hosted download
Request body
{
  "template": "monthly-invoice",
  "data": {
    "company": { "name": "Acme Corp" },
    "items": [
      { "description": "Web Design", "qty": 1, "price": 2500 }
    ],
    "total": 2500
  },
  "options": { "page_size": "A4" }
}

Response (200)

{
  "id": "conv_kP3xNqWm",
  "status": "completed",
  "document_id": "doc_8c2ef1a3",
  "page_count": 1,
  "duration_ms": 29,
  "template": "monthly-invoice",
  "template_version": 3
}

The response includes template and template_version for traceability. Send Accept: application/pdf to receive raw PDF bytes. This endpoint also supports hosting options for public download links with expiration, limits, and password protection.

Render Templates - pdfRelay Docs | pdfRelay