> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit

> Apply changes to your Word, PowerPoint, Excel or PDF file without touching anything else.

```json theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
{
  "operation": "edit",
  "file": "file_01JAB3...",
  "prompt": "Headings in blue and add a confidentiality clause"
}
```

* Works for Word, PowerPoint, Excel and PDF. The result comes out in the same format, with its PDF. It also takes
  `.doc`, `.ppt` and `.xls`; the result comes out as `.docx`, `.pptx` or `.xlsx`.
* `file` can be an uploaded file or a document Doconda already made, by its id (`"doc_01JAB3…"`).
* Only what you ask for changes; the rest stays identical.
* The same agent that [creates](/en/guides/create#how-its-made) does it, with the same effort per
  [level](/en/guides/create#quality-levels):
  * **Word**: it opens the file, joins the pieces of text Word splits, changes its XML with a program and checks it
    against the original. If you ask for tracked changes, every change is marked (inserted or deleted) under
    "Doconda"; it can also add comments or accept every pending change.
  * **PowerPoint**: it looks at the slides, duplicates, orders or deletes what it needs and changes their text,
    keeping the design.
  * **Excel**: it opens it with openpyxl, changes what you ask with real formulas and recalculates until no error is
    left.
  * **PDF**: it changes it in the PDF itself.
* New content copies the document's formatting: an added clause follows the numbering and look of the existing ones.
* `.doc`, `.ppt` and `.xls`, or when the agent can't finish (`agent.fallback`): it's edited on the fast path, which
  turns the request into concrete changes. Each change arrives as an `edit.operation_applied` event with the before and
  after, and is kept in the report (`edits`); if it can't, the document ends in `failed` with `edit_not_understood` and
  isn't charged. In a PDF, if you ask for more than changing text, it's converted to Word (`pdf.converted`).
* Afterwards it's reviewed as in [Review](/en/guides/review).
* 50 pages maximum.

## Save a hand-edited version

If someone changes the file by hand (in the dashboard editor, or in Word or Excel) and you want to keep it in Doconda, send it
as a new version of the document:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl https://api.eu.doconda.com/v1/documents/doc_01JAB3.../versions \
  -H "Authorization: Bearer $DOCONDA_KEY" \
  -F file=@informe-corregido.docx
```

* Creates a new document with `mode: "manual"` and `parent_id` pointing to the original. The original doesn't change.
* Goes through the same review as everything else (PDF, previews, report), and the report lists which paragraphs, cells or
  text were added, changed or removed (`changes`).
* It must be the same format as the document (Word, Excel or PowerPoint); otherwise, `file_format_mismatch`.
* No AI, and not charged.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.