Kalpana Docs
Resources

Rename an asset

Change the display name of an image.

PATCH /api/assets/{id}

Requires assets:update.

FieldRequiredDescription
workspaceYesWorkspace slug or id.
nameYesNew file name. Cannot be empty.
curl --request PATCH "https://app.kalpana.one/api/assets/ASSET_ID" \
  --header "x-api-key: $KALPANA_API_KEY" \
  --header "content-type: application/json" \
  --data '{"workspace":"acme","name":"logo-dark.png"}'

Response

{
  "id": "0b0f5a3e-5b1c-4d65-9a5e-3f7d2f2f6c11",
  "workspaceId": "ws_123",
  "contentHash": "…",
  "storageKey": "…",
  "filename": "logo-dark.png",
  "contentType": "image/png",
  "sizeBytes": 20480,
  "meta": { "width": 512, "height": 512 },
  "uploadedBy": "user_123",
  "status": "ready",
  "createdAt": "2026-09-01T10:00:00.000Z",
  "updatedAt": "2026-09-02T09:00:00.000Z"
}

Returns the updated asset, in the shape shown in List assets without collectionIds and url. Only the name changes; the stored file and its id stay the same, so image variables that use it are not affected. Names do not have to be unique.

Errors

StatusCause
400name is missing or empty.
403Your role or key lacks assets:update.
404The asset is not in this workspace.
Was this page helpful?

Updated 4 Nov 2026

On this page