Skip to main content

Gen API Overview

The Gen API enables you to generate documents programmatically from templates with merge data, batch processing, versioning, and governance workflows.

Key Features

  • Template Management - Create, version, and promote reusable document templates
  • Document Generation - Generate PDF and HTML documents from templates with merge data
  • Batch Processing - Generate hundreds of documents in a single API call
  • Template Versioning - Track template changes with full version history
  • Approval Workflows - Governance controls for template promotion across environments

Architecture

Core Concepts

Template

A template defines the structure and layout of a document. Templates contain placeholders for merge data that get filled during generation.

Template Version

Each template maintains a version history. New versions can be created, listed, and restored. Only approved versions can be promoted to production.

Document

A document is a generated output from a template combined with merge data. Documents can be in PDF or HTML format.

StatusDescription
DRAFTCreated, not yet generating
GENERATINGGeneration in progress
GENERATEDSuccessfully generated
FAILEDGeneration failed

Batch

A batch generates multiple documents from a single template with different merge data in one API call.

StatusDescription
PENDINGQueued for processing
PROCESSINGGeneration in progress
COMPLETEDAll documents generated
FAILEDBatch processing failed
CANCELLEDBatch was cancelled

Approval

An approval is a governance gate for promoting templates between environments (DEV, TEST, PROD). Approvals can be approved or rejected with comments.

API Base URL

EnvironmentBase URL
Productionhttps://api.propper.ai/v1/docgen

Authentication

The Gen API uses OAuth 2.0 with bearer tokens:

POST https://auth.propper.ai/oauth2/token
Content-Type: application/json

{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"scope": "docgen:read docgen:write"
}

Authentication Guide →

OAuth Scopes

ScopeDescription
docgen:readRead templates, documents, batches, and approvals
docgen:writeCreate/update templates, generate documents, create batches
docgen:adminArchive/promote templates, cancel/retry batches, review approvals

Rate Limits

API requests are rate limited to ensure fair usage and platform stability. See the Rate Limits page for details on limits, headers, and best practices.

Next Steps

Quickstart

Generate your first document in 5 minutes.

API Reference

Complete endpoint documentation with examples.