Skip to main content
You’ll write a script that takes a Word file, reviews it, downloads the fixed version and tells you whether it can be sent or whether something is left to look at. The review uses no AI and never changes your text or your amounts: it only fixes what is safe (tables wider than the page, headings alone at the bottom of a page, split signatures, gaps in numbering…) and reports the rest.

What you need

  • A Doconda API key in DOCONDA_API_KEY. Create it in the dashboard, under API keys.
  • Python 3.9+ or Node 20+.
  • A Word file to review, for example contract.docx. .doc works too: it comes back as .docx.

1. Install the SDK

2. Upload the file and ask for the review

create with operation: "review" waits until the review is done and returns the document.
status tells you how it turned out:

3. Read the report

The report has two lists: ledger, with every fix that was tried (applied or rejected, and why), and issues, with what is left to look at and where it is.
An issue in the report looks like this:

4. Decide and download the fixed Word file

If the status is ready or ready_with_warnings, you save the fixed version. Otherwise, check the report.

Result

  • contract-reviewed.docx: the same document, with the safe fixes applied. It is still editable.
  • The PDF version, if you need it: download(id, "pdf").
  • The report: what was fixed, what was discarded and what is left to look at, with the page of each issue.
If status is needs_review, the report says what is missing and where. For example, an amount in words that doesn’t match the figure (money.words_mismatch) is flagged, not corrected: you decide.

Next steps