Generate the document (or some sections)
Starts a durable run: prepares inputs (automatic fields, form validation, the template preparation agent when configured), resolves each section’s variant,…
Starts a durable run: prepares inputs (automatic fields, form validation, the template preparation agent when configured), resolves each section’s variant, then composes the sections — fixed template text and form values without AI, AI only for the template’s designated regions — and validates the result once with at most one correction per section. Interactive runs stop with status waiting_for_input when a decision is needed; unattended runs (the default for API keys) leave those sections pending. Unchanged inputs make no AI call. Retry safely with the same requestId.
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/documents/string/runs" \ -H "Content-Type: application/json" \ -d '{}'{ "run": { "actions": [ "start" ], "continuesRunId": "220d98ce-0683-4028-96ba-ba3b7ea4699d", "createdAt": "string", "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052", "error": "string", "findingsSummary": { "blocking": 0, "info": 0, "warning": 0 }, "finishedAt": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "mode": "interactive", "outcome": "finished", "phase": "preparing", "questions": [ { "allowText": true, "answer": { "at": "string", "by": "string", "optionId": "string", "value": "string" }, "blocking": true, "fieldKey": "string", "id": "string", "kind": "missing_data", "options": [ { "id": "string", "label": "string" } ], "sectionIds": [ "string" ], "text": "string" } ], "scope": [ "string" ], "sections": [ { "attempts": 0, "caseId": "string", "caseSource": "rule", "deterministic": true, "message": "string", "name": "string", "sectionId": "string", "status": "pending" } ], "status": "queued", "updatedAt": "string", "validation": { "error": "string", "findings": 0, "status": "pending" }, "version": 0 }}Resolve a filled placeholder to a form/memory proposal POST
Resolve a filled placeholder to a form/memory proposal - POST /documents/{documentId}/resolve-placeholder. DocDealer REST API reference.
The latest run of the document (null when it was never generated) GET
The latest run of the document (null when it was never generated) - GET /documents/{documentId}/runs/current. DocDealer REST API reference.