delete_file
Delete a file by id. It moves to a 30-day trash, and its old link stops working immediately. Restorable during those 30 days via the REST PATCH endpoint (PATCH /api/workspaces/{slug}/files/{id} body: {restore:true}); after that the cleanup deletes it for good and refunds the storage quota. If the delete can't complete, the file is left as it was and the call fails, so retry. Editor role required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The workspace slug. Accepts either the bare slug or the org-prefixed form ('my-org/my-workspace') as shown in the dashboard URL. | |
| file_id | Yes | The file cuid (from list_files). |