Restrict an API key to a workspace folder
Anchor an API key to one workspace and folder, verify access inside the subtree, and confirm files outside it remain unavailable.
Last reviewed
A workspace and folder anchor limits where a credential can reach. Use it for applications that should see only one project tree.
Before you start
- Use a disposable workspace and non-confidential test file.
- Choose the smallest permissions and surfaces the task requires.
- Prepare a password manager or secret store; never place a real key in a screenshot, URL or repository.
- Plan to revoke the test key after verification.
Steps: restrict an api key to a workspace folder
- Create a key and choose the intended workspace under Where can it reach.
- Select the folder anchor and verify its displayed path.
- Choose the required operation permission and protocol surfaces.
- Save the one-time secret.
- List or upload inside the anchored folder.
- Attempt access outside the subtree and confirm it is denied.

Expected result
The test key performs its allowed operation, rejects an operation outside its boundary, and can be identified and revoked without changing the account password.
Limits and important details
- Moving or deleting the anchor can affect the integration.
- The anchor does not grant access that the owning account lacks.
- A folder anchor is separate from a human member folder restriction.
Troubleshooting
The request returns unauthorized. Check the complete secret, API endpoint and whether the key was revoked.
The request returns forbidden. Compare the operation with the key permission, protocol surface, workspace and folder anchor.
A secret was exposed. Revoke it immediately, create a replacement with least privilege and remove the exposed value from logs and history.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.