Remove file
remove_fileRemove (detach) a file from an entity by id. This only retracts the link between the file and the record — the underlying file is not deleted from storage and the entity itself is unchanged. Unlike the delete_* tools (delete_document, delete_folder, delete_expense, …) which remove whole records or folders, this leaves both the file and the entity intact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Entity kind to attach the file to, e.g. "expense", "income", "asset", "transaction", "entry", "client", "supplier", "product". For any document — invoice, quote, credit/debit note, purchase order, bill or goods-received note — use "contract" (its id may start with cont-, inv- or order-); the correct storage attribute is resolved from the id, so a bill (cont-… id) also resolves whether you pass "contract", "bill" or "invoice". | |
| fileid | Yes | Id of the uploaded file to attach (see /file/upload). | |
| entityid | Yes | Id of the entity to attach the file to. |