SnozeDevelopers
API referenceAssets

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.

POST
/v1/workspaces/{workspaceId}/assets/{fileId}/rotate-access-key

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
fileId*string

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/assets/string/rotate-access-key'
Example Response
{  "data": {    "fileId": "string",    "accessKey": "string"  }}