| name | documenso-data-handling |
| description | Handle document data, signatures, and PII in Documenso integrations.
Use when managing document lifecycle, handling signed PDFs,
or implementing data retention policies.
Trigger with phrases like "documenso data", "signed document",
"document retention", "documenso PII", "download signed pdf".
|
| allowed-tools | Read, Write, Edit |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","documenso","documenso-data"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Documenso Data Handling
Overview
Best practices for handling documents, signatures, and PII in Documenso integrations. Covers downloading signed PDFs, data retention, GDPR compliance, and secure storage. Note: Documenso cloud stores documents in PostgreSQL by default; self-hosted gives you full control.
Prerequisites
- Understanding of data protection regulations (GDPR, CCPA)
- Secure storage infrastructure (S3, GCS, or local encrypted storage)
- Completed
documenso-install-auth setup
Document Lifecycle
DRAFT ──send()──→ PENDING ──all sign──→ COMPLETED
│
├──reject()──→ REJECTED
└──cancel()──→ CANCELLED
Data handling implications:
- DRAFT: mutable, can delete freely
- PENDING: immutable document, but status changes
- COMPLETED: signed PDF available for download, archive
- REJECTED/CANCELLED: cleanup candidate
Instructions
Step 1: Download Signed Documents
import { Documenso } from "@documenso/sdk-typescript";
import { writeFile } from "node:fs/promises";
const client = new Documenso({ apiKey: process.env.DOCUMENSO_API_KEY! });
async function downloadSignedPdf(documentId: number, outputPath: string) {
const doc = await client.documents.getV0(documentId);
if (doc.status !== "COMPLETED") {
throw new Error();
}
res = (
,
{ : { : } }
);
(!res.) ();
buffer = .( res.());
(outputPath, buffer);
.();
}