Runnable e-signature workflow examples: create a document, send it for electronic signature, track status, and handle completion — via REST API, webhooks, and the Model Context Protocol (MCP). Copy an example, set your API key, and sign documents online in minutes.
Practical document signing patterns for developers and ops teams. Every example runs against a free PandaDoc account — no sales call required. Get a free API key »
| Folder | What it gives you |
|---|---|
examples/node |
Node.js: create from template → send for signature → poll status |
examples/python |
Python: the same signing workflow, end to end |
examples/webhooks |
Verify and handle signature webhooks (no polling) |
examples/mcp |
Let an AI agent (Claude, Cursor, ChatGPT) send documents for e-signature over MCP |
templates |
Ready-to-send document templates (mutual NDA, service agreement) |
checklists |
E-signature compliance checklist (ESIGN / UETA / eIDAS) + pre-send checklist |
workflows |
End-to-end recipes: quote → signature, NDA before a call |
migration |
Move an existing e-signature flow off DocuSign / HelloSign to an API-first setup |
git clone https://github.com/PandaDoc/esignature-workflow-examples.git
cd esignature-workflow-examples/examples/node
npm install
export PANDADOC_API_KEY="your_api_key" # https://signup.pandadoc.com/free
export TEMPLATE_UUID="your_template_uuid"
node send-for-signature.jsThat's the whole electronic-signature workflow: the script creates a document from your template, waits for it to reach document.draft, and sends it to the recipient to e-sign.
Every document-signing flow in this repo follows the same five steps:
- Create a document — from a template, an uploaded PDF, or a file URL.
- Wait for status
document.uploaded→document.draft(3–5 seconds). - Send the document for electronic signature.
- Track signing status — via webhooks (recommended) or status polling.
- Download the completed, legally binding signed PDF.
create ──▶ draft ──▶ send ──▶ viewed ──▶ completed ──▶ download
Do not call send immediately after create — always wait for document.draft.
- No per-seat signing app to log into — signing happens inside your own product or script.
- Legally binding electronic signatures: SOC 2 Type II, GDPR, eIDAS, U.S. ESIGN Act, and UETA compliant.
- Free to start: the free plan includes REST API access, an API key, MCP access, and sandbox testing.
See the e-signature compliance checklist before you go to production.
- A PandaDoc account and API key — free signup
- Node 18+ (for the Node examples) or Python 3.9+ (for the Python examples)
- Docs: developers.pandadoc.com · MCP guide: github.com/PandaDoc/mcp-server-guide
Issues and pull requests welcome — see CONTRIBUTING.md. Want an example we don't have yet? Request an example.
MIT — use these examples in your own projects freely.