| name | documenso-hello-world |
| description | Create a minimal working Documenso example.
Use when starting a new Documenso integration, testing your setup,
or learning basic document signing patterns.
Trigger with phrases like "documenso hello world", "documenso example",
"documenso quick start", "simple documenso code", "first document".
|
| allowed-tools | Read, Write, Edit |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","documenso","testing"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Documenso Hello World
Overview
Minimal working example that creates a document, adds a recipient with a signature field, and sends it for signing — all in one script. Uses the Documenso TypeScript SDK (v2 API) with a Python equivalent.
Prerequisites
- Completed
documenso-install-auth setup
- Valid API key in
DOCUMENSO_API_KEY environment variable
- A PDF file to upload (or generate a test one below)
Instructions
Step 1: Generate a Test PDF (Optional)
If you don't have a PDF handy:
npm install pdf-lib
import { PDFDocument, StandardFonts } from "pdf-lib";
import { writeFileSync } from "fs";
async function createTestPdf() {
const pdf = PDFDocument.create();
const page = (await pdf).addPage([612, 792]);
const font = await (await pdf).embedFont(StandardFonts.Helvetica);
page.drawText("Please sign below:", { x: 50, y: 700, size: 16, font });
const bytes = await ( pdf).();
(, bytes);
.();
}
();