Implement Documenso template-based workflows and direct signing links.
Use when creating reusable templates, generating documents from templates,
or implementing direct signing experiences.
Trigger with phrases like "documenso template", "signing link",
"direct template", "reusable document", "template workflow".
Implement Documenso template-based workflows and direct signing links.
Use when creating reusable templates, generating documents from templates,
or implementing direct signing experiences.
Trigger with phrases like "documenso template", "signing link",
"direct template", "reusable document", "template workflow".
allowed-tools
Read, Write, Edit
version
1.13.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","documenso","workflow"]
compatibility
Designed for Claude Code, also compatible with Codex and OpenClaw
Documenso Core Workflow B: Templates & Direct Signing
Overview
Create reusable templates, generate documents from templates with prefilled fields, and implement direct signing links for public/anonymous signers. Templates define the PDF, fields, and recipient roles once — then stamp out documents on demand.
Prerequisites
Completed documenso-core-workflow-a
At least one PDF uploaded to Documenso as a template
Understanding of recipient roles and field types
Instructions
Step 1: Create a Template via Dashboard
Templates are created in the Documenso UI:
Navigate to Templates in the sidebar.
Click Create Template and upload a PDF.
Add placeholder recipients (e.g., "Signer 1", "Approver") — these become roles that get filled when creating documents from the template.
Place fields on the PDF and assign them to placeholder recipients.
Save the template and note the template ID from the URL.
Step 2: Create Document from Template (v1 REST API)
// The v1 API has a dedicated template endpointconst templateId = 42; // From the dashboard URLconst res = awaitfetch(
`https://app.documenso.com/api/v1/templates/${templateId}/create-document`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DOCUMENSO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Service Agreement — Acme Corp",
recipients: [
{
email: "ceo@acme.com",
: ,
: ,
},
],
: [
{ : , : },
{ : , : },
],
}),
}
);
= res.();
.();
name
"Alice CEO"
role
"SIGNER"
// Optionally prefill fields by their IDs
prefillFields
id
"field_abc123"
value
"2026-03-22"
id
"field_def456"
value
"Acme Corporation"
const
document
await
json
console
log
`Created document ${document.documentId} from template ${templateId}`