Resources
Delete several assets
Delete up to 50 images at once, keeping any that are in use.
POST /api/assets/bulk-deleteRequires assets:delete.
| Field | Required | Description |
|---|---|---|
workspace | Yes | Workspace slug or id. |
ids | Yes | 1 to 50 asset ids. |
curl --request POST "https://app.kalpana.one/api/assets/bulk-delete" \
--header "x-api-key: $KALPANA_API_KEY" \
--header "content-type: application/json" \
--data '{"workspace":"acme","ids":["ASSET_ID_1","ASSET_ID_2"]}'Response
{
"deleted": 1,
"inUse": 1,
"failed": 0
}| Field | Description |
|---|---|
deleted | Images removed from the workspace, from every image collection and from storage. They cannot be recovered. |
inUse | Images kept because a template that is not deleted uses them, or an AI image edit was made from them. |
failed | Images kept because their file could not be removed from storage. Try them again. |
Each image is checked on its own, so some can go while others stay. Links from deleted templates do not count as in use: they are removed with the image. Ids that are not in the workspace, and internal template previews, are skipped and not counted. More than 50 ids returns 400.
Errors
| Status | Cause |
|---|---|
400 | ids is empty or has more than 50 items. |
403 | Your role or key lacks assets:delete. |
Was this page helpful?
Updated 4 Nov 2026