Skip to main content

Generate Document from Template

Generates a downloadable PDF document from a specified Lumin template.

This endpoint takes an existing template identified by template_id and produces a static document based on its content and structure.

Currently, this operation supports Lumin Sign templates, allowing you to prefill merge text tags and form fields, and create a finalized PDF ready for distribution or archiving.

Path Parameters
template_id string REQUIRED

ID of the template to generate document from

Request Body
tags object[]

Key–value pairs for Merge Text Tags defined in the template. Keys must match tag names. Values replace those tags in the generated document. Currently supports merge tags with syntax: [text-merge|req|sender|object.field].

fields object[]

Key–value pairs for Form Fields defined in the template. Keys must match field names. Values prefill the corresponding fields.

document_name string

Optional custom name for the generated document. Defaults to the template's name if omitted.

Responses
200

Successfully generated document from template

Schema OPTIONAL
document_name string

Name of the generated document (from input or default).

signed_url uri

Signed HTTPS URL to download the generated document. Expires in 30 minutes.

expires_at unix-epoch

Unix epoch timestamp in seconds when the signed URL expires.

4xx

Unexpected error

Schema OPTIONAL
error_code string
error_message string