Rename or move a collection
zotero_update_collectionRename a Zotero collection or move it under a different parent, including to the library root. Uses optimistic concurrency to prevent overwriting changes.
Instructions
Rename a collection and/or move it under a different parent. Pass parentCollectionKey=null to move a collection to the root of the library. The current version is fetched automatically unless expectedVersion is given, in which case the write fails with a conflict if the collection changed in the meantime.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name. Omit to leave the name unchanged. | |
| groupId | No | Group library ID. Omit for the personal library ("My Library"), which is what almost every request wants. Group IDs come from zotero_list_libraries. | |
| collectionKey | Yes | Key of the collection to modify. | |
| expectedVersion | No | Version the collection is expected to be at, for conflict detection. Omit to use the current version. | |
| parentCollectionKey | No | New parent collection key, or null to move to the library root. Omit to leave the parent unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updated | Yes | ||
| collectionKey | Yes | ||
| libraryVersion | Yes |