SnozeDevelopers
API referenceAssets

Open a protected PDF, save its password privately, or unlock it for all readers

Open and Save require read permission. Save stores an encrypted password only for the authenticated person. Unlock requires file edit permission and replaces the stored PDF with decrypted bytes while preserving its file id and references.

POST
/v1/workspaces/{workspaceId}/assets/{fileId}/access

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

Request Body

application/json
  1. body
action*string
Value in"open""save""unlock""forget"
password?|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/assets/string/access' \  -H 'Content-Type: application/json' \  -d '{  "action": "open"}'
Example Response
{  "data": {    "base64": "string",    "saved": true,    "unlocked": true  }}