Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.luminpdf.com/llms.txt

Use this file to discover all available pages before exploring further.

Lumin templates are documents built in the Lumin application that contain placeholders — merge tags, form fields, and variables — which you can populate with dynamic data to produce customized PDF documents on demand. The same template can serve two purposes:
  • Generate a standalone PDF — produce a filled document without a signing workflow.
  • Send as a signature request — use the template as the document in a signature request via the /signature_request/send-from-template endpoint.
Tags and field names use object.field naming conventions (for example: Client.Name, Effective.Date, Customer.AgreeToTerms).

Placeholder types

TypeUsed inDescription
Merge tagSign templatesText placeholder embedded in document content. Replaced with a plain-text value during generation.
Form fieldSign and PDF templatesInteractive input in the document (text box, checkbox). Can be prefilled with a value.
VariableAgreementGen templatesDynamic variable rendered as plain text. Used by AgreementGen (ag_ prefix templates).
Signature fields and radio button fields cannot be prefilled. They will appear empty in the generated document regardless of any value you provide.

1
List your templates
2
Call GET /templates to see the templates available in your workspace. Provide the X-Lumin-API-Version: 1.1 header.
3
curl https://api.luminpdf.com/v1/templates \
  -H "Authorization: API-key <your-key>" \
  -H "X-Lumin-API-Version: 1.1"
4
{
  "page": 1,
  "limit": 25,
  "total_count": 3,
  "data": [
    {
      "template_id": "sign_123456",
      "type": "pdf",
      "name": "Mutual NDA",
      "created_at": 1748456885430,
      "updated_at": 1748456885430
    },
    {
      "template_id": "ag_456789",
      "type": "lumin",
      "name": "Lease Agreement",
      "created_at": 1748456885430,
      "updated_at": 1748456885430
    },
    {
      "template_id": "pdf_456789",
      "type": "pdf",
      "name": "Onboarding Form",
      "created_at": 1748456885430,
      "updated_at": 1748456885430
    }
  ]
}
5
Note the template_id — the prefix tells you the template type:
6
PrefixTemplate typesign_Lumin Sign template (supports merge tags and signer roles)ag_AgreementGen template (supports variables)pdf_PDF template (supports form fields)
7
Get template details
8
Call GET /templates/{template_id} to inspect the specific tags, fields, and variables the template expects. Use this to know exactly what keys to include when you generate the document.
9
curl https://api.luminpdf.com/v1/templates/sign_123456 \
  -H "Authorization: API-key <your-key>"
10
{
  "template_id": "sign_123456",
  "type": "pdf",
  "name": "Mutual NDA",
  "signing_type": "ORDER",
  "signer_roles": [
    { "name": "Tenant", "group": 1 },
    { "name": "Client", "group": 2 }
  ],
  "tags": [
    { "name": "Client.Name", "type": "merge_tag", "is_required": true },
    { "name": "Effective.Date", "type": "merge_tag", "is_required": false }
  ],
  "fields": [
    {
      "name": "Customer.Name",
      "type": "text",
      "is_required": true,
      "assigned_role": "Tenant"
    },
    {
      "name": "Customer.AgreeToTerms",
      "type": "checkbox",
      "is_required": true,
      "assigned_role": "Tenant"
    }
  ],
  "variables": [{ "name": "Company.Name" }, { "name": "Document.Name" }],
  "created_at": 1748456885430,
  "updated_at": 1748456885430
}
11
Supply values for every item where is_required: true. Optional fields can be omitted.
12
Generate the PDF
13
Call POST /templates/{template_id}/generate-document with the values for your tags, fields, and/or variables.
14
JSON response
curl -X POST https://api.luminpdf.com/v1/templates/sign_123456/generate-document \
  -H "Authorization: API-key <your-key>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "tags": {
      "Client.Name":    "Acme Corp",
      "Effective.Date": "2025-08-01"
    },
    "fields": {
      "Customer.Name":         "John Doe",
      "Customer.AgreeToTerms": true
    },
    "variables": {
      "Company.Name":  "Acme Corp",
      "Document.Name": "Mutual NDA"
    },
    "document_name": "NDA_AcmeCorp"
  }'
PDF binary response
curl -X POST https://api.luminpdf.com/v1/templates/sign_123456/generate-document \
  -H "Authorization: API-key <your-key>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/pdf" \
  -d '{
    "tags": {
      "Client.Name":    "Acme Corp",
      "Effective.Date": "2025-08-01"
    },
    "fields": {
      "Customer.Name":         "John Doe",
      "Customer.AgreeToTerms": true
    },
    "document_name": "NDA_AcmeCorp"
  }' \
  --output NDA_AcmeCorp.pdf
15
JSON response (Accept: application/json):
16
{
  "document_name": "NDA_AcmeCorp",
  "signed_url": "https://files.luminpdf.com/download/nda-acmecorp-abc123.pdf?expires=...",
  "expires_at": 1766726700
}
17
signed_url is a pre-signed HTTPS download link that expires in 30 minutes (expires_at is a Unix timestamp in seconds).
18
PDF binary response (Accept: application/pdf):
19
When you set Accept: application/pdf, the API returns the raw PDF binary stream instead of JSON. Use this to stream the file directly without a separate download step.

Request body reference

{
  "tags": {
    "Client.Name": "Acme Corp",
    "Effective.Date": "2025-08-01"
  },
  "fields": {
    "Customer.Name": "John Doe",
    "Customer.AgreeToTerms": true
  },
  "variables": {
    "Company.Name": "Acme Corp",
    "Document.Name": "NDA Document"
  },
  "document_name": "My Contract"
}
FieldTypeDescription
tagsobjectMerge tag values for Sign templates. Keys must match tag names exactly.
fieldsobjectForm field values. Supports text (string) and checkbox (boolean).
variablesobjectVariable values for AgreementGen templates.
document_namestringOptional. Name for the generated document. Defaults to the template name.