Resources
Set an asset's collections
Replace the list of image collections one image belongs to.
PUT /api/assets/{assetId}/collectionsRequires assets:update.
| Field | Required | Description |
|---|---|---|
workspace | Yes | Workspace slug or id. |
collectionIds | Yes | Every collection the image should be in. Send [] to take it out of all of them. |
curl --request PUT "https://app.kalpana.one/api/assets/ASSET_ID/collections" \
--header "x-api-key: $KALPANA_API_KEY" \
--header "content-type: application/json" \
--data '{"workspace":"acme","collectionIds":["COLLECTION_ID"]}'Response
{
"assetId": "0b0f5a3e-5b1c-4d65-9a5e-3f7d2f2f6c11",
"collectionIds": ["0192f8a4-6c1e-7c3a-9b0e-4d2f1a7e5c11"]
}The image is removed from collections not in the list and added to the ones that are. Repeated ids count once.
Errors
| Status | Cause |
|---|---|
400 | A collection in collectionIds is not in the workspace. The message is One or more asset collections do not exist, and nothing changes. |
403 | Your role or key lacks assets:update. |
404 | The image is not in this workspace. |
Was this page helpful?
Updated 4 Nov 2026