Skip to content

item (Lifecycle)

Operations for duplicating items, transferring items across libraries, exporting files to disk and moving items through Trash, Restore and Purge.

item.duplicate

POST /api/v1/item/duplicate Permission: files.write Target: Library Callers: Web, MCP, Plugin MCP: item_duplicate

Create independent duplicate items with their own copied file bytes and identical tags, folders, ratings, notes, source URLs and custom fields.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Item IDs to duplicate.
library string No Default library Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns { success: true; ids: string[] } — UUIDs of the new duplicate items.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/duplicate \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."]}'
const { ids } = await curio.item.duplicate({ ids: [item.id] })
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"item_duplicate","arguments":{"ids":["0194b7a2-..."]}}}

Example response

{ "success": true, "ids": ["0194b7d0-1111-7222-8333-444455556666"] }

Events and errors Emits items.added (how: "duplicate").


item.copyToLibrary

POST /api/v1/item/copyToLibrary Permission: files.write Target: Library Callers: Web, MCP, Plugin MCP: item_copyToLibrary

Copy items (and their grouped companions, tags, ratings, notes and matching custom fields) into another open or closed library on this computer. The caller must also be permitted to access the destination library.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Source item IDs.
to string Yes — Destination library ID from library.list, folder path or name.
library string No Default library Source library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns { success: true; count: number }.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/copyToLibrary \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."],"to":"Archive"}'
const { count } = await curio.item.copyToLibrary({ ids: [item.id], to: 'Archive' })
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"item_copyToLibrary","arguments":{"ids":["0194b7a2-..."],"to":"Archive"}}}

Example response

{ "success": true, "count": 1 }

Events and errors Emits items.added on the destination library. Returns 404 unknown_library or 409 library_offline if destination cannot be reached; 403 not_allowed if token cannot reach to.


item.moveToLibrary

POST /api/v1/item/moveToLibrary Permission: files.write Target: Library Callers: Web, MCP, Plugin MCP: item_moveToLibrary

Copy items to another library (identically to item.copyToLibrary) and then move the source items into the source library's Trash.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Source item IDs.
to string Yes — Destination library ID from library.list, folder path or name.
library string No Default library Source library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns { success: true; count: number }.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/moveToLibrary \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."],"to":"Archive"}'
const { count } = await curio.item.moveToLibrary({ ids: [item.id], to: 'Archive' })
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"item_moveToLibrary","arguments":{"ids":["0194b7a2-..."],"to":"Archive"}}}

Example response

{ "success": true, "count": 1 }

Events and errors Emits items.added on destination and items.removed (purged: false) on source.


item.export

POST /api/v1/item/export Permission: files.outside Target: Library Callers: Web, MCP, Plugin MCP: item_export

Copy items' files into a folder on disk (creating the folder if missing and appending numeric suffixes rather than overwriting existing files).

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Item IDs to export.
folder string Yes — Destination directory path on disk.
members boolean No true Also export companion/grouped member files.
library string No Default library Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns { success: true; count: number }.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/export \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."],"folder":"C:\\Exports\\Selected","members":true}'
const { count } = await curio.item.export({ ids: [item.id], folder: 'C:\\Exports\\Selected' })
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"item_export","arguments":{"ids":["0194b7a2-..."],"folder":"C:\\Exports\\Selected"}}}

Example response

{ "success": true, "count": 1 }

Events and errors Read-only in the database; writes only to folder. Returns 403 not_allowed without files.outside.


item.trash

POST /api/v1/item/trash Permission: metadata.write Target: Library Callers: Web, MCP, Plugin MCP: item_trash

Move items to the library Trash. Original files remain intact until item.purge empties the Trash.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Item IDs to trash.
library string No Default library Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns Done.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/trash \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."]}'
await curio.item.trash({ ids: [item.id] })
{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"item_trash","arguments":{"ids":["0194b7a2-..."]}}}

Example response

{ "success": true }

Events and errors Emits items.removed (purged: false).


item.restore

POST /api/v1/item/restore Permission: metadata.write Target: Library Callers: Web, MCP, Plugin MCP: item_restore

Restore trashed items back to the library and their previous folders.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Yes — Trashed item IDs to restore.
library string No Default library Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns Done.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/restore \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."]}'
await curio.item.restore({ ids: [item.id] })
{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"item_restore","arguments":{"ids":["0194b7a2-..."]}}}

Example response

{ "success": true }

Events and errors Emits items.added (how: "restore").


item.purge

POST /api/v1/item/purge Permission: files.write Target: Library Callers: Web, MCP, Plugin MCP: item_purge

Permanently remove trashed items from the library (or empty the entire Trash). Managed copies owned by Curio are sent to the system trash / Recycle Bin; linked location originals on disk are never deleted.

Parameters

Parameter Type Required Default Description
ids (string \| number)[] Unless all: true — Specific trashed item IDs to purge.
all boolean No false Empty the entire Trash.
library string No Default library Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers.

Returns Done.

Example request

curl -s -X POST http://127.0.0.1:41733/api/v1/item/purge \
  -H "Authorization: Bearer curio_..." \
  -H "Content-Type: application/json" \
  -d '{"ids":["0194b7a2-..."]}'
await curio.item.purge({ ids: [item.id] })
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"item_purge","arguments":{"all":true}}}

Example response

{ "success": true }

Events and errors Emits items.removed (purged: true).