Bytefusedocs

Generate

Bulk Certificates

Fill a template’s {{variables}} from each row of a CSV and get back one rendered document per row, packaged as a single ZIP — certificates, badges, letters, invoices, anything templated.

Login required 20 credits / rowSynchronous

Overview

Upload a PDF or DOCX template containing {{variables}} and a CSV whose header names match those variables. Every row becomes one document; the whole batch is streamed back as a ZIP in a single request — no job to poll.

POSThttps://api.bytefuse.in/api/v1/certificate/bulk

Login required, and billed per row

Certificates are not free-to-try — anonymous → 401. Cost is 20 credits per data row, so a 1,000-row file costs 20,000 credits. Send a dt_live_ key or JWT.

Request

Content type multipart/form-data:

templatefilerequired
A PDF or DOCX template with {{variable}} placeholders. The variables are filled from each CSV row.
data_filefilerequired
A CSV file — a header row of variable names, then one row per document. (Despite older wording, Excel isn’t parsed; export to CSV first.)
output_formatstringoptional
pdf or docx. Match it to your template format — cross-format conversion is not performed (see the note below).Default: pdf

Match output_format to the template

If output_format differs from the template’s format, the engine keeps the original bytes and only relabels the extension — a PDF template with output_format=docx yields PDF bytes named .docx. Keep them the same for correct files.

Billing

The operation certificate.bulk is charged 20 credits per row in the CSV. The debit happens up front for the counted rows, before rendering; if the engine fails, the whole charge is refunded. The X-Credits-Charged header reports the total.

Response

The ZIP is returned directly

The response body is the raw ZIP (application/zip, Content-Disposition: attachment; filename="certificates.zip") — not JSON, and not a download URL. Files inside are named from each row’s name column. Two headers accompany it: X-Credits-Charged and X-Certificates-Generated.

Examples

recipients.csv
name,course,date
Ada Lovelace,Algorithms 101,2026-07-04
Alan Turing,Computability,2026-07-04
curl -X POST https://api.bytefuse.in/api/v1/certificate/bulk \
  -H "X-API-Key: dt_live_your_key" \
  -F "template=@certificate_template.pdf" \
  -F "data_file=@recipients.csv" \
  -F "output_format=pdf" \
  -o certificates.zip

Stricter alias

POST /api/v1/generate/certificates is a stricter alias of the same tool — it rejects a non-PDF/DOCX template and an empty CSV up front with 422, and uses a true CSV row count. Auth, credits and behaviour are otherwise identical.

Errors

401Anonymous / not signed in — certificates are login-only.
422An engine validation error.
402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500No data rows found, or generation failed unexpectedly.