Trash or restore Zotero items
zotero_trash_itemsMove Zotero items to trash or restore them without permanent deletion. Recover trashed items anytime in the Zotero app. Use reversible trash instead of irreversible delete.
Instructions
Move items to the trash (the safe, REVERSIBLE default) or restore them. This sets the deleted flag (1=trash, 0=restore) — it is NOT a permanent delete, so trashed items can be recovered here or in the Zotero app. Use this instead of zotero_delete_items unless you truly need irreversible removal. Provide item_keys and optional action (default "trash"). Writes go to the running Zotero desktop app for your personal library (via its local-API writes where available), otherwise to the cloud Web API. When the server sets a bulk-write threshold (ZOTEUS_CONFIRM_BULK_WRITES, off by default), trashing more items than that in one call also needs confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Default "trash". | |
| confirm | No | Required to trash more items in one call than the server's bulk-write threshold. | |
| item_keys | Yes | Item keys to trash or restore. | |
| library_id | No | Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id. | |
| library_type | No | Which library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| failed | No | One entry per object the write could not land; absent or empty when all of them did. | |
| target | No | Where the write went: "local" (Zotero desktop local API), "desktop" (connector protocol) or "cloud" (Zotero Web API). | |
| updated | Yes | Keys of the items trashed or restored. | |
| libraryVersion | No | The library's Last-Modified-Version after this write. |