DEV Community

Alex Spinov
Alex Spinov

Posted on

Documenso Has a Free API: Open-Source Document Signing That Replaces DocuSign

What is Documenso?

Documenso is an open-source document signing platform — a self-hosted alternative to DocuSign, HelloSign, and PandaDoc. Send documents for signature, track status, and manage templates via API.

Quick Start

git clone https://github.com/documenso/documenso
cd documenso
npm install
npx prisma migrate deploy
npm run dev
Enter fullscreen mode Exit fullscreen mode

The REST API

export DOCU_URL="https://your-documenso.com/api/v1"
export DOCU_TOKEN="your-api-key"
Enter fullscreen mode Exit fullscreen mode

Create and Send Document

# Upload document
curl -X POST "$DOCU_URL/documents" \
  -H "Authorization: $DOCU_TOKEN" \
  -F "file=@contract.pdf" \
  -F 'title=Service Agreement'

# Add recipients
curl -X POST "$DOCU_URL/documents/DOC_ID/recipients" \
  -H "Authorization: $DOCU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "signers": [
      {"email": "client@company.com", "name": "John Doe", "role": "SIGNER"},
      {"email": "cfo@company.com", "name": "Jane Smith", "role": "APPROVER"}
    ]
  }'

# Add signature fields
curl -X POST "$DOCU_URL/documents/DOC_ID/fields" \
  -H "Authorization: $DOCU_TOKEN" \
  -d '{
    "fields": [
      {"type": "SIGNATURE", "page": 1, "positionX": 100, "positionY": 500, "recipientId": "RECIPIENT_ID"},
      {"type": "DATE", "page": 1, "positionX": 300, "positionY": 500, "recipientId": "RECIPIENT_ID"}
    ]
  }'

# Send for signing
curl -X POST "$DOCU_URL/documents/DOC_ID/send" \
  -H "Authorization: $DOCU_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Check Document Status

# Get document details
curl -s "$DOCU_URL/documents/DOC_ID" \
  -H "Authorization: $DOCU_TOKEN" | jq '{status, recipients: [.recipients[] | {name, status}]}'

# List all documents
curl -s "$DOCU_URL/documents?page=1&perPage=20" \
  -H "Authorization: $DOCU_TOKEN" | jq '.documents[] | {title, status, createdAt}'
Enter fullscreen mode Exit fullscreen mode

Templates

# Create template
curl -X POST "$DOCU_URL/templates" \
  -H "Authorization: $DOCU_TOKEN" \
  -F "file=@nda-template.pdf" \
  -F 'title=NDA Template'

# Create document from template
curl -X POST "$DOCU_URL/templates/TEMPLATE_ID/generate" \
  -H "Authorization: $DOCU_TOKEN" \
  -d '{
    "title": "NDA - Acme Corp",
    "recipients": [
      {"email": "legal@acme.com", "name": "Acme Legal"}
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

Download Signed Document

curl -o signed-contract.pdf "$DOCU_URL/documents/DOC_ID/download" \
  -H "Authorization: $DOCU_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Features

  • E-signatures: Legally binding digital signatures
  • Templates: Reusable document templates
  • Custom branding: Your logo, colors, domain
  • Audit trail: Complete signing history
  • Webhooks: Real-time status updates
  • Multi-signer: Sequential or parallel signing

Webhooks

// Webhook payload when document is signed
{
  "event": "DOCUMENT_SIGNED",
  "data": {
    "documentId": "doc_123",
    "recipientEmail": "client@company.com",
    "signedAt": "2026-03-28T12:00:00Z"
  }
}
Enter fullscreen mode Exit fullscreen mode

Documenso vs DocuSign

Feature Documenso DocuSign HelloSign
Open source Yes No No
Self-host Yes No No
Free documents Unlimited 3/mo 3/mo
API REST REST REST
Price Free (self) $10/mo $15/mo
Custom branding Free Business plan Business plan

Need document automation or e-signature integration?

📧 spinov001@gmail.com
🔧 My tools on Apify Store

DocuSign or open-source? How do you handle signatures?

Top comments (0)