DO

documenso-common-errors

Provides troubleshooting steps for common Documenso API errors including 401 unauthorized, 403 forbidden, and 429 rate limiting.

Install

mkdir -p .claude/skills/documenso-common-errors && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6293" && unzip -o skill.zip -d .claude/skills/documenso-common-errors && rm skill.zip

Installs to .claude/skills/documenso-common-errors

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Diagnose and resolve common Documenso API errors and issues.
60 charsno explicit “when” trigger
Beginner

Key capabilities

  • Diagnose HTTP error codes (401, 403, 404, 413, 429)
  • Verify API key and header formatting
  • Validate document status before modification
  • Convert pixel-based coordinates to percentage-based
  • Debug webhook delivery issues

How it works

The skill provides a reference table mapping HTTP status codes to specific causes and code-level solutions for common Documenso integration errors.

Inputs & outputs

You give it
Error code or failed operation
You get back
Resolution steps

When to use documenso-common-errors

  • Fixing Documenso 401 unauthorized errors
  • Resolving API rate limit issues
  • Debugging document upload failures

About this skill

Documenso Common Errors

Overview

Quick-reference troubleshooting guide for Documenso API errors. Covers authentication, document lifecycle, field validation, file upload, webhook, and SDK-specific issues with concrete solutions.

Prerequisites

  • Working Documenso integration (see documenso-install-auth)
  • Access to application logs
  • API key available

HTTP Error Reference

StatusErrorCauseSolution
401UnauthorizedInvalid, expired, or missing API keyRegenerate key in dashboard; verify Authorization: Bearer <key> header
403ForbiddenPersonal key accessing team resourcesUse a team-scoped API token
404Not FoundWrong document/template ID or deleted resourceVerify ID with GET /api/v1/documents
400Bad RequestInvalid payload or missing required fieldsCheck request body against API spec
413Payload Too LargePDF exceeds upload limitCompress PDF; cloud plan limit varies by tier
429Too Many RequestsRate limit exceededImplement backoff; see documenso-rate-limits
500/502/503Server ErrorDocumenso infrastructure issueRetry with exponential backoff; check status.documenso.com

Instructions

Scenario 1: 401 Unauthorized

// WRONG: missing or malformed header
const res = await fetch("https://app.documenso.com/api/v1/documents", {
  headers: { "Authorization": process.env.DOCUMENSO_API_KEY! }, // Missing "Bearer "
});

// CORRECT: include Bearer prefix
const res = await fetch("https://app.documenso.com/api/v1/documents", {
  headers: { "Authorization": `Bearer ${process.env.DOCUMENSO_API_KEY}` },
});

// SDK handles this automatically:
import { Documenso } from "@documenso/sdk-typescript";
const client = new Documenso({ apiKey: process.env.DOCUMENSO_API_KEY! });

Checklist:

  • API key starts with api_ (personal) or is team-scoped
  • No trailing whitespace or newline in env var
  • Key hasn't been revoked in dashboard

Scenario 2: 403 — Personal Key on Team Resources

// Error: "Forbidden" when accessing team documents
// Personal API keys can only access YOUR documents
// Fix: generate a team API key from Team Settings > API Tokens
const client = new Documenso({
  apiKey: process.env.DOCUMENSO_TEAM_API_KEY!, // Team-scoped key
});

Scenario 3: Cannot Modify Sent Document (400)

// Error: trying to add fields to a PENDING document
// Documents can only be modified in DRAFT status

// Check status first
const doc = await client.documents.getV0(documentId);
if (doc.status !== "DRAFT") {
  throw new Error(`Cannot modify document in ${doc.status} status. Cancel first or create new.`);
}

// To re-edit: cancel the sent document, modify, then re-send
// Note: cancelling notifies all recipients

Scenario 4: Invalid Field Position (400)

// Error: field coordinates out of range
// pageX and pageY are PERCENTAGE-based (0-100), not pixel-based

// WRONG: pixel coordinates
await client.documentsFields.createV0(docId, {
  recipientId, type: "SIGNATURE",
  pageNumber: 1,
  pageX: 200,  // Invalid: > 100
  pageY: 600,  // Invalid: > 100
  pageWidth: 150, pageHeight: 50,
});

// CORRECT: percentage coordinates
await client.documentsFields.createV0(docId, {
  recipientId, type: "SIGNATURE",
  pageNumber: 1,
  pageX: 10,     // 10% from left edge
  pageY: 80,     // 80% from top edge
  pageWidth: 30, // 30% of page width
  pageHeight: 5, // 5% of page height
});

Scenario 5: File Upload Errors (413)

// Error: PDF too large for upload
// Cloud plans have per-document size limits

// Solution 1: Compress PDF before upload
import { PDFDocument } from "pdf-lib";
const pdfDoc = await PDFDocument.load(readFileSync("large-contract.pdf"));
const compressed = await pdfDoc.save({ useObjectStreams: true });
// Upload compressed version

// Solution 2: Check file size before upload
const MAX_SIZE_MB = 10; // Varies by plan
const fileSizeMB = readFileSync("contract.pdf").length / (1024 * 1024);
if (fileSizeMB > MAX_SIZE_MB) {
  throw new Error(`PDF is ${fileSizeMB.toFixed(1)}MB, max is ${MAX_SIZE_MB}MB`);
}

Scenario 6: Webhook Not Receiving Events

Checklist:
1. Webhook URL uses HTTPS (HTTP is rejected)
2. Webhook is enabled in Team Settings > Webhooks
3. Correct events are selected (document.completed, etc.)
4. Your endpoint returns 200 within 10 seconds
5. If using ngrok: tunnel is active and URL matches dashboard config
6. Check X-Documenso-Secret header matches your stored secret

Scenario 7: SDK Type Mismatches

// Error: argument type mismatch with SDK
// The SDK uses specific enum strings, not arbitrary values

// WRONG
await client.documentsRecipients.createV0(docId, {
  email: "[email protected]",
  name: "Jane",
  role: "signer", // Lowercase fails
});

// CORRECT: use uppercase enum values
await client.documentsRecipients.createV0(docId, {
  email: "[email protected]",
  name: "Jane",
  role: "SIGNER", // Must be uppercase: SIGNER, VIEWER, APPROVER, CC
});

// Field types are also uppercase: SIGNATURE, TEXT, DATE, NAME, EMAIL,
// INITIALS, NUMBER, CHECKBOX, DROPDOWN, RADIO, FREE_SIGNATURE

Debugging Quick Commands

# Test API key
curl -s -w "\n%{http_code}" \
  -H "Authorization: Bearer $DOCUMENSO_API_KEY" \
  https://app.documenso.com/api/v1/documents?page=1&perPage=1

# Check self-hosted instance health
curl -s https://your-instance.com/api/health

# List documents to verify access
curl -s -H "Authorization: Bearer $DOCUMENSO_API_KEY" \
  "https://app.documenso.com/api/v1/documents?page=1&perPage=5" | jq '.documents[].title'

Error Handling

IssueCauseSolution
ERR_INVALID_URLBad serverURL in SDK configInclude protocol and path: https://host/api/v2
ECONNREFUSEDSelf-hosted instance downCheck Docker container status
Module not foundSDK not installedRun npm install @documenso/sdk-typescript
Stale document dataCaching old stateRe-fetch document after status changes

Resources

Next Steps

For comprehensive debugging, see documenso-debug-bundle.

When not to use it

  • When the error is unrelated to the Documenso API
  • When the issue is a network-level infrastructure failure

Prerequisites

Working Documenso integrationAccess to application logsAPI key

Limitations

  • Personal API keys cannot access team resources
  • PDF upload size limits vary by plan

How it compares

This skill provides specific code-level fixes for Documenso-specific API constraints, rather than generic HTTP debugging advice.

Compared to similar skills

documenso-common-errors side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
documenso-common-errors (this skill)127dCautionBeginner
n8n-expression-syntax64moNo flagsBeginner
claude-in-chrome-troubleshooting22moReviewIntermediate
openrouter-common-errors327dCautionIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

n8n-expression-syntax

czlonkowski

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.

6111

claude-in-chrome-troubleshooting

trailofbits

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

211

openrouter-common-errors

jeremylongshore

Execute diagnose and fix common OpenRouter API errors. Use when troubleshooting failed requests. Trigger with phrases like 'openrouter error', 'openrouter not working', 'openrouter 401', 'openrouter 429', 'fix openrouter'.

39

linear-common-errors

jeremylongshore

Diagnose and fix common Linear API errors. Use when encountering Linear API errors, debugging integration issues, or troubleshooting authentication problems. Trigger with phrases like "linear error", "linear API error", "debug linear", "linear not working", "linear authentication error".

16

gamma-common-errors

jeremylongshore

Debug and resolve common Gamma API errors. Use when encountering authentication failures, rate limits, generation errors, or unexpected API responses. Trigger with phrases like "gamma error", "gamma not working", "gamma API error", "gamma debug", "gamma troubleshoot".

12

groq-common-errors

jeremylongshore

Diagnose and fix Groq common errors and exceptions. Use when encountering Groq errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "groq error", "fix groq", "groq not working", "debug groq".

12

Search skills

Search the agent skills registry