Compose many documents from one template
Renders the same template once per item — a run of invoices, contracts or letters from one call.
Every item’s data is validated first. If ANY item fails, nothing renders and the call answers 422 with an errors[] naming the failing item indexes and instance paths: a half-finished batch is worse than none.
output decides what comes back:
files(the default) stores each PDF and returns the list. An item’snamenames its file (<name>.pdf); without one the files are numbered from the template slug.zipstores ONE archive holding every PDF and returns that single file.
A name must be a bare file name — no /, no \, no .., no leading dot — and two items may not end up with the same file name.
Learn more: Compose
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
spaceId
Request
This endpoint expects an object.
template
items
output
Allowed values:
Response
The composed files, or the single zip file.
object
data
Errors
400
Bad Request Error
404
Not Found Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error