What a completion PDF is
A certificate of completion is a one-page record: issuer, title, recipient, citation, date, and a credential identifier. LMS platforms, cohort bootcamps, and internal training tools emit one file per learner when a course marks complete. The file is not a signed legal instrument. RelayPDF has no e-sign product and this guide does not add signatures, witness blocks, or certificate authorities.
Print quality matters more than interactive form fields. Recipients download a static PDF, print it, or attach it to a profile. Landscape A4 is the usual paper. Chromium on POST /v1/pdf prints HTML the same way a browser print dialog would, including background color and webfonts.
Use the stock certificate layout
Do not start from a blank HTML document unless the brand requires it. The public gallery at https://relaypdf.com/pdf-templates lists Handlebars layouts you can clone. The Certificate category currently has one stock file: Certificate Template, gallery id certificate, page https://relaypdf.com/pdf-templates/certificate/certificate. It is an A4 landscape award plate: issuer and title centered, recipient in display serif, citation in a short measure, date and credential on the base rail, amber ornament and a diamond seal.
Sample templateData on that page is:
{
"issuer": "Northline Atelier School",
"title": "Certificate of Completion",
"recipient": "Elise Maren",
"body": "has completed the twelve-week Spatial Identity studio and is qualified to lead environmental graphic work for civic and cultural clients.",
"awardedOn": "2026-08-21",
"credentialId": "NAS-2026-184"
}
Clone from the dashboard gallery or POST /v1/templates with name and galleryId "certificate". That creates an account-owned draft. Edit HTML if you need a logo, legal line, or extra field. Publish the draft. After publish, templateId is the UUID or the slug you assigned. Template lifecycle, validation, preview, and version pin are documented at https://relaypdf.com/docs/templates.
Handlebars data contract
POST /v1/pdf accepts exactly one source: html, url, markdown, or templateId. For certificates use templateId plus templateData. HTML in stored templates is UTF-8, not Base64. templateData is a JSON object whose keys match Handlebars paths in the layout. Optional templateVersion pins a published version so a later draft edit does not change already-issued files. Optional strict: true fails the job if a path is missing. Request-level options override saved print options for that job only. See https://relaypdf.com/docs/pdf.
Map your LMS fields onto the sample keys or rename both the template and the payload together. Keep awardedOn as an ISO date string if you format it in the template. Keep credentialId unique per issuance. Store the same id in your database before you call the API so a reprint uses the same identifier. RelayPDF will not mint serials for you.
QR for verification, not payment
A verification URL is useful if you operate a public lookup. Encode that URL as a QR image, then place the image in the certificate HTML. POST /v1/barcodes generates the mark. It does not stamp the mark onto an existing PDF. Compose it in the template (img src) or stamp later with POST /v1/pdf/stamp. Docs: https://relaypdf.com/docs/barcodes.
Supported types include qr, code128, code39, ean13, upca, pdf417, and datamatrix. For a completion page, type qr is enough. Body fields: type, text, optional format (png or svg), scale, includetext, filename. Example body: {"type":"qr","text":"https://learn.example.com/verify/NAS-2026-184","format":"png"}.
Typical flow: persist the credential row, build https://your-domain/verify/{credentialId}, call POST /v1/barcodes with response url or binary, turn the PNG into a data URI or a 24-hour file URL, pass that string in templateData (for example qrSrc), and render. The stock certificate sample JSON does not include a QR field. Add {{qrSrc}} (or the name you choose) to your cloned draft before publish. Do not point the QR at a payment link. This is not an invoice.
Render one certificate
Authorization is Bearer pdf_live_… from the dashboard. Query-string keys are rejected. POST https://api.relaypdf.com/v1/pdf with JSON:
{
"templateId": "certificate",
"templateData": {
"issuer": "Northline Atelier School",
"title": "Certificate of Completion",
"recipient": "Elise Maren",
"body": "has completed the twelve-week Spatial Identity studio…",
"awardedOn": "2026-08-21",
"credentialId": "NAS-2026-184",
"qrSrc": "data:image/png;base64,…"
},
"filename": "NAS-2026-184.pdf",
"options": { "format": "a4", "landscape": true, "printBackground": true }
}
response defaults to binary: 200 application/pdf with x-relaypdf-id, x-relaypdf-size, and content-disposition. response url returns JSON with a public download that expires in 24 hours. response async returns 202 and a pollUrl; poll GET /v1/jobs/:id or set callbackUrl (https only). Failed jobs are not billed. HTML/URL/Markdown/template PDF is billed at the published HTML-to-PDF rate. Barcode generation is a separate PDF-tools charge.
Node: client.pdf.fromTemplate(templateId, templateData, extras). Python: client.pdf.from_template(templateId, templateData, **extra). CLI: relaypdf pdf --template with data. Same JSON field names as REST. Landscape and format belong in options if the published template did not save them.
Cohorts and reprints
A weekly cohort is a loop in your worker, not a special RelayPDF batch type. For each completer, write the credential row, create the QR, call POST /v1/pdf. Use async plus a callbackUrl when you do not want the HTTP request to wait. Rate limits return 429 with Retry-After and are not billed. Do not share one credentialId across learners.
Reprints should send the same templateVersion and the same templateData you stored at issue time. If you later change the published layout, old serials will look different unless you pin templateVersion. Files on GET /v1/files/:id last 24 hours. Copy the PDF into your own bucket if the learner will download it after that window.
What not to put on the page
Do not add signature pads, DocuSign tags, or “signed electronically” footers. This API prints pixels. A PNG of a wet-ink signature is just an image; it is not an e-sign workflow and this article will not describe one. Do not treat the QR as proof of identity. The QR only opens the URL you encoded. Your verify page is the source of truth.
Do not send PII you do not need. Recipient name and course title are enough for most completion files. Request logs at RelayPDF keep time, endpoint, status, and latency; document contents are not written to those logs. Generated files are deleted after 24 hours on their side.
Checklist
1. Clone https://relaypdf.com/pdf-templates/certificate/certificate (galleryId certificate). 2. Add an img bound to a QR data field. Publish. 3. On completion, insert a credential row and a public verify URL. 4. POST /v1/barcodes type qr. 5. POST /v1/pdf with templateId, templateData, landscape A4, printBackground true. 6. Store your own copy of the bytes or the 24-hour URL before it expires. 7. Read https://relaypdf.com/docs/templates and https://relaypdf.com/docs/barcodes when a field name changes.
That is the full generate certificate pdf api path on RelayPDF: Handlebars for the plate, barcodes for the QR, Chromium for the PDF. No e-sign.