Create collection
Create a collection or a subcollection in My Library.
POST https://cotlet.dev/api/v1/zotero/collections
write
Creates a collection with the name you give, at the top level or under a parent collection. Two collections may share a name, so the call returns the new key. It reaches nobody and runs without asking first; delete the collection in Zotero if you do not want it.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Collection name. |
| parent_collection_key string | string | Create it under this collection. |
Request
curl -X POST https://cotlet.dev/api/v1/zotero/collections \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("zotero", "create_collection", {"name":"Jane Doe"}) const result = await cotlet.call('zotero', 'create_collection', {"name":"Jane Doe"}); cotlet call zotero create_collection --data '{"name":"Jane Doe"}' Example response
{
"collection_key": "M2D7FQ4S",
"name": "Chapter 2",
"parent": "C4T8WZ2N"
}