Save a file to the sidebar
Puts the file in the workspace's sidebar as a file item pointing at the same bytes, at the root or in `folderItemId`. A file has at most one sidebar item: one already in the sidebar is returned as it is (`existing`), and one in the trash is brought back (`restored`). Requires a workspace member who can read the file and has the `resources:write` permission. Send an `Idempotency-Key` header to make retries safe.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringfileId*stringapplication/json- body
title?string|nullfolderItemId?string|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/assets/string/save' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "item": { "id": "0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e", "workspaceId": "4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02", "parentItemId": "d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39", "kind": "database", "targetId": "9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85", "title": "Launch tasks", "icon": "rocket", "color": "#2f6f4f", "order": 0, "archived": false, "accessMode": "open", "metadata": {}, "createdAt": "2026-07-01T09:12:44.000Z", "updatedAt": "2026-07-14T16:03:10.000Z" }, "outcome": "created" }}Delete an asset
Deletes the file record and, when no other record shares its storage key, the stored object itself. Requires a workspace member with the `files:write` permission. A file that is still referenced elsewhere is refused with a conflict carrying the full reference report; pass `force=1` to detach every reference first, each owner emitting its normal update event, and delete anyway.
Rotate an asset's access key
Issues a fresh access key for the file and returns it, which invalidates every capability URL previously handed out for that file. Requires a workspace member with the `files:write` permission; an unknown or malformed file id is reported as not found.