Skip to content

documents.delete

documents.delete(id: string): Promise<void>

Soft-delete a stored document. The PDF is purged from storage; metadata is retained for audit. Spec §6.4. DELETE /v1/documents/:id.

Name Type Required Description
id string required (no description)

Promise<void>

Code When
DOCUMENT_NOT_FOUND See [errors](../../../production/errors/) for the full description.
INVALID_API_KEY See [errors](../../../production/errors/) for the full description.
INTERNAL_ERROR See [errors](../../../production/errors/) for the full description.
// Demonstrates: client.documents.delete(id) — soft-delete a stored document.
import { PoliPage } from '@poli-page/sdk';
const client = new PoliPage({ apiKey: process.env.POLI_PAGE_API_KEY! });
await client.documents.delete('doc_abc123');
// Returns void. The PDF is purged; metadata is retained for audit.
console.log('Deleted.');