Create a PDF
Renders a template (template_id) or raw html. response: binary (default, the PDF) or url (JSON with a signed link). With async: true the answer is 202 and the result arrives as pdf.created or pdf.failed. deliver.email emails the PDF. test: true makes a watermarked test document (not counted) even with a live key. e_invoice issues a structured invoice as Factur-X / ZUGFeRD (a PDF/A-3b with the XML embedded) or XRechnung (the XML itself, application/xml); see the EInvoice schema. merge_data is for no-code forms (GET /v1/templates/{id}/fields, tree): its empty values (null, empty strings, empty objects and arrays) are dropped and the rest is deep-merged over data. The JSON answer (response: url) carries every Document field, plus filename, metadata, warnings and blocked_resources.
Request
- Base URL: https://api.castpdf.com
- URL: https://api.castpdf.com/v1/pdf
- Auth: HTTP bearer
Headers
1 to 255 printable ASCII characters. The same key and body within 24 hours return the first result instead of doing the work again.
Request body
Response
The PDF (response: binary) or its JSON (response: url). An XRechnung e_invoice answers with the XML (application/xml). E-invoices carry the header x-e-invoice: <standard>/<profile>.
Changes
No recorded changes to this operation across all 1 revision of this API.