Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Delete a vault

Deleting a vault immediately purges all its documents, files, and events and frees the vault slot from your quota. Use deletion to explicitly clean up vaults you no longer need, or to free persisted vault quota.
import { initialise } from '@prudra/core';
import { deleteVault } from '@prudra/vault';

initialise({ apiKey: process.env.PRUDRA_API_KEY! });

await deleteVault({ vaultId: 'vlt_clx1abc123' });
console.log('Vault deleted — all contents purged');

What deletion removes

ContentRemoved
Vault metadata recordYes
DocumentsYes
File GCS objectsYes
CDN cache entriesYes (within minutes)
Vault eventsYes
Webhook delivery logsNo (kept for audit)
Deletion is permanent and irreversible. There is no soft-delete or recycle bin.

When to delete

  • You have processed results and no longer need the vault
  • You’ve hit persisted vault quota and need to free a slot
  • Cleaning up test vaults in development

Active vaults delete automatically

Active vaults expire automatically at the end of their TTL — you don’t need to delete them. Explicit deletion is most useful for persisted vaults where you want to free the persisted quota slot.

Deleting an active vault

You can delete a vault in any state, including active. This is destructive — if work is in progress, it is cancelled and the vault’s contents are lost.

Error handling

ErrorStatusCauseResolution
vault-not-found404Vault ID doesn’t exist or already deletedNo action needed