Skip to content

API Surface

Last verified: 2026-07-26 against current checkout c09254f.

The /v1 config API is the public authoring/configuration surface for DocGen. The operational guide is Authoring and config API; this page is the stable map of the API areas.

Live Schema

Use the running service for the exact live schema:

GET /v1/config-schema

Main API Areas

Area Purpose
Templates Create, configure, export, update, dry-run, and apply template specs.
Documents Instantiate templates, configure instances, generate documents, and export outputs.
Sections Define the ordered output regions of a template/document.
Fields Set per-document parameters copied from templates to instances.
Data needs Configure the gather phase for deterministic source collection.
Texts and snippets Manage reusable org-scoped deterministic content.
Tools Register and invoke configured deterministic/MCP data sources.
Generation Run gather/synthesize/render/verify and observe progress.

Rules

  • Prefer /v1 over direct database writes for authoring/configuration.
  • Use dry-run before applying new or changed specs.
  • Treat spec JSON as the version-controlled source of truth for seeded templates.
  • Do not bypass org scoping; every template/document belongs to an organization.