DELETE
/api/public/v1/vault-documents/{documentId}Archive or delete a Vault document
Archives by default. Pass `permanent=true` to remove it for good, which for a folder deletes everything inside it and drops the files from storage. Removing anything other than a system folder is limited to whoever created it, or a Vault Admin. System folders cannot be deleted at all — except the auto-mirrored Channel and DM ones, which members may remove because they re-sync from their conversation anyway. Every removal writes an audit event.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
vault:admin
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Required | Document ID. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
permanent | boolean | Optional | Set `true` to remove rather than archive. There is no undo.Default: false |
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/vault-documents/{documentId}" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Document archived successfully.",
"content": {
"documentId": "vdoc_4410"
}
}403Example response
json
{
"message": "Only the item’s creator, or a Vault Admin, can delete it."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.