docuseal
v1.0.1
Published
DocuSeal CLI — manage esignature templates, submissions, and submitters from the terminal
Maintainers
Readme
Quick Start
# Run directly with npx (no install needed)
npx docuseal configure
# Or install globally
npm install -g docuseal
docuseal configureThe configure command will prompt for your API token and server:
Server [global/europe/url] (default: global): global
Enter your API token: xxxxxxxxxx
✓ Saved to ~/.config/docuseal/credentials.jsonGet your API token from DocuSeal Console or DocuSeal EU Console.
Installation
npm install -g docusealRequirements: Node.js 18+
Usage
docuseal [COMMAND]
TOPICS
templates Manage templates
submissions Manage submissions
submitters Manage submitters
COMMANDS
configure Configure API key and serverEvery command supports --help for full usage details:
docuseal submissions create --helpConfiguration
Interactive Setup
docuseal configureNon-Interactive Setup
docuseal configure --api-key YOUR_KEY --server globalShow Current Config
docuseal configure --list
# ✓ Current configuration
# api_key: vS7EwXPy...kDmq
# server: https://api.docuseal.comEnvironment Variables
export DOCUSEAL_API_KEY=your_key
export DOCUSEAL_SERVER=global # global, europe, or full URLConfig File
Stored at ~/.config/docuseal/credentials.json:
{
"apiKey": "your_key",
"server": "https://api.docuseal.com"
}Priority: CLI flag > environment variable > config file.
Servers
| Value | URL |
|-------|----------------------------|
| global | https://api.docuseal.com |
| europe | https://api.docuseal.eu |
| URL | Your self-hosted instance |
Agent Skills
This CLI ships with an agent skill that teaches AI coding agents (Cursor, Claude Code, Windsurf, etc.) how to use the DocuSeal CLI effectively — including non-interactive flags, output formats, and common pitfalls.
Install skills from the central skills repository:
npx skills add docusealco/docuseal-agent-skillsTemplates
List Templates
docuseal templates list
docuseal templates list --folder Legal -l 50
docuseal templates list --archived
docuseal templates list --activeRetrieve Template
docuseal templates retrieve 1001Create Template from PDF
docuseal templates create-pdf --file contract.pdf --name "NDA"
docuseal templates create-pdf --file form.pdf --folder-name LegalCreate Template from DOCX
docuseal templates create-docx --file template.docx --name "Contract"Create Template from HTML
# Inline HTML
docuseal templates create-html --html "<p><text-field name=\"Name\"></text-field></p>" --name "Simple"
# From file
docuseal templates create-html --file template.html --name "Contract"Update Template
docuseal templates update 1001 --name "NDA v2"
docuseal templates update 1001 --folder-name Contracts
docuseal templates update 1001 -d "roles[]=Signer" -d "roles[]=Reviewer"
docuseal templates update 1001 --archive
docuseal templates update 1001 --unarchiveClone Template
docuseal templates clone 1001
docuseal templates clone 1001 --name "NDA Copy"Merge Templates
docuseal templates merge -d "template_ids[]=1001" -d "template_ids[]=1002"
docuseal templates merge -d "template_ids[]=1001" -d "template_ids[]=1002" --name "Combined"Update Template Documents
docuseal templates update-documents 1001 -d "documents[0][file]=https://example.com/doc.pdf" -d "documents[0][name]=New Doc"
docuseal templates update-documents 1001 --mergeArchive Template
docuseal templates archive 1001Submissions
List Submissions
docuseal submissions list
docuseal submissions list --status pending
docuseal submissions list --template-id 1001 -l 50Create Submission
Send a template for signing:
# Single submitter
docuseal submissions create \
--template-id 1001 \
-d "submitters[0][email][email protected]"
# Multiple submitters with roles
docuseal submissions create \
--template-id 1001 \
-d "submitters[0][role]=Signer" \
-d "submitters[0][email][email protected]" \
-d "submitters[1][role]=Witness" \
-d "submitters[1][email][email protected]"
# With options
docuseal submissions create \
--template-id 1001 \
-d "submitters[0][email][email protected]" \
--no-send-email \
--expire-at "2025-12-31" \
--order random
# Using JSON
docuseal submissions create \
--template-id 1001 \
-d '{"submitters":[{"email":"[email protected]","role":"Signer"}]}'Create Submission from PDF
Skip template creation — send a tagged PDF directly for signing:
docuseal submissions create-pdf \
--file document.pdf \
-d "submitters[0][email][email protected]"Create Submission from DOCX
docuseal submissions create-docx \
--file document.docx \
-d "submitters[0][email][email protected]"Send by Email
Send a template to multiple email addresses at once:
docuseal submissions send-emails \
--template-id 1001 \
--emails [email protected],[email protected]Retrieve Submission
docuseal submissions retrieve 502Get Submission Documents
docuseal submissions documents 502
docuseal submissions documents 502 --mergeArchive Submission
docuseal submissions archive 502Submitters
List Submitters
docuseal submitters list
docuseal submitters list --submission-id 502Retrieve Submitter
docuseal submitters retrieve 201Update Submitter
# Change email
docuseal submitters update 201 --email [email protected]
# Mark as completed (auto-sign via API)
docuseal submitters update 201 --completed
# Re-send signature request
docuseal submitters update 201 --send-email
# Pre-fill fields and metadata
docuseal submitters update 201 -d "values[First Name]=John" -d "metadata[department]=Sales"Global Flags
These flags work on every command:
| Flag | Description |
|---------------|-----------------------------------------------|
| --api-key | Override API key for this invocation |
| --server | Server: global, europe, or full URL |
Flags available on list commands:
| Flag | Description |
|-----------------|-------------------------------------------|
| -l, --limit | Limit number of results |
| -a, --after | Cursor for pagination |
Flag available on commands with body parameters:
| Flag | Description |
|---------------|-----------------------------------------------|
| -d, --data| Set params with bracket notation or JSON (repeatable) |
Override Server Per-Command
# Query a different server without changing config
docuseal templates list --server europe
docuseal templates list --server https://docuseal.yourdomain.comDevelopment
Setup
git clone https://github.com/docusealco/docuseal-cli.git
cd docuseal-cli
npm installRun from Source
DOCUSEAL_API_KEY=your_key npm run dev -- templates list
npm run dev -- --helpRun Tests
npm testInstall Locally
npm run build
npm linkThis creates a global docuseal command that points to your local source. Any code changes take effect after npm run build.
To unlink:
npm unlink -g docusealBuild
npm run buildBundles everything into dist/index.js using esbuild.
API Documentation
This CLI wraps the DocuSeal API. Every API parameter is available as a CLI flag or -d data parameter.
Run --help on any command to see all available flags and data parameters:
docuseal templates create-pdf --help
docuseal submissions create --help
docuseal submitters update --helpConfiguration
| Item | Path | Notes |
|------|------|-------|
| Config directory | ~/.config/docuseal/ | Respects $XDG_CONFIG_HOME on Linux, %APPDATA% on Windows |
| Credentials | ~/.config/docuseal/credentials.json | 0600 permissions (owner read/write only) |
| Install directory | Global npm prefix | Via npm install -g docuseal |
License
MIT
