/api/public/v1/vault-documents/{documentId}Archive a Vault document
Moves it to the Archive, where it can be restored for 30 days before it is deleted for good — a folder with everything inside it, files and all. There is no removing it sooner. 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 Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Required | Document ID. |
curl -X DELETE "https://www.pxb.app/api/public/v1/vault-documents/{documentId}" \
-H "Authorization: Bearer your_access_token"{
"message": "Document archived successfully.",
"content": {
"documentId": "vdoc_4410"
}
}{
"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.