Compose a document from a template and data
Renders one of your saved compose templates with the data you pass, and gives you back a PDF.
template is the config id or slug from POST /v1/compose/configs. data is validated against that template’s JSON Schema BEFORE anything renders, so a missing field costs you a 422 with the exact instance paths, not a broken document.
output decides what comes back:
file(the default) stores the PDF in your corpus and returns the file object, with thetemplateHashof the exact bundle that produced it.rawstreams the PDF bytes straight back and stores nothing.
Learn more: Compose
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
template
data
output
Allowed values:
Response
The PDF bytes (output: "raw" only — nothing was stored).
Errors
400
Bad Request Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error