Skip to main content
Planned — Document generation endpoints are being added to the v1 API. See the Roadmap for overall API direction.
The Document Generation API lets you upload form templates, generate populated documents for quotes and policies, and download the results.

Key Concepts

  • Form template — a DOCX file containing smart tags (placeholders) that get resolved against entity data
  • Smart tags — placeholder tokens in a template that map to configured fields. Every field you define in your configuration automatically gets a smart tag
  • Document generation — the process of resolving all smart tags in a template against a quote or policy, producing a final PDF

Planned Endpoints

Template Management

MethodEndpointDescription
POST/v1/form-templatesUpload a DOCX template with smart tags
GET/v1/form-templatesList templates
GET/v1/form-templates/{templateId}Get template metadata
DELETE/v1/form-templates/{templateId}Delete a template
GET/v1/form-templates/{templateId}/smart-tagsList smart tags found in the template

Quote Documents

MethodEndpointDescription
POST/v1/quotes/{quoteId}/documents/generateGenerate documents for a quote
GET/v1/quotes/{quoteId}/documentsList generated documents for a quote
GET/v1/quotes/{quoteId}/documents/{documentId}Download a generated quote document

Policy Documents

MethodEndpointDescription
POST/v1/policies/{policyId}/documents/generateGenerate documents for a policy
GET/v1/policies/{policyId}/documentsList generated documents for a policy
GET/v1/policies/{policyId}/documents/{documentId}Download a generated policy document

Workflow

  1. Upload a template — upload a DOCX file containing smart tags to POST /v1/form-templates
  2. Inspect smart tags — call GET /v1/form-templates/{templateId}/smart-tags to see which tags the system found in your template
  3. Generate a document — call the generate endpoint for a quote or policy. The system resolves all smart tags against the entity data and produces a PDF
  4. Download the result — retrieve the generated PDF via the document download endpoint

Smart Tags

Every field you define in your configuration automatically gets a corresponding smart tag. When you add a field (e.g., insuredName), its smart tag becomes immediately available for use in templates. The smart tags endpoint on a template lets you verify that all tags in your template map to configured fields. A dedicated configuration endpoint will also be available for listing all smart tags across your company, independent of any specific template:
MethodEndpointDescription
GET/v1/smart-tagsList all available smart tags for your company