Add items to collection
Add items to a collection; they stay in the collections they are already in.
POST https://cotlet.dev/api/v1/zotero/items-to-collections
write
Adds the items to the collection the way dragging them onto it does, so they keep their other collections. It reaches nobody and runs without asking first; Remove Item(s) from Collection… in Zotero undoes it.
Parameters
| Name | Type | Description |
|---|---|---|
| collection_key string required | string | Collection key from list_collections. |
| item_keys string[] required | string[] | Items to add. |
Request
curl -X POST https://cotlet.dev/api/v1/zotero/items-to-collections \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"collection_key":"collection key","item_keys":["item keys"]}' result = client.call("zotero", "add_items_to_collection", {"collection_key":"collection key","item_keys":["item keys"]}) const result = await cotlet.call('zotero', 'add_items_to_collection', {"collection_key":"collection key","item_keys":["item keys"]}); cotlet call zotero add_items_to_collection --data '{"collection_key":"collection key","item_keys":["item keys"]}' Example response
{
"collection_key": "C4T8WZ2N",
"added": [
"H6R2VB5D",
"N9Q4XA7E"
],
"already_in_collection": []
}