Skip to content

PandaDoc/esignature-workflow-examples

Repository files navigation

e-signature workflow examples

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 »


What's in here

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

Quick start (send a document for signature)

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.js

That'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.


The core e-signature workflow

Every document-signing flow in this repo follows the same five steps:

  1. Create a document — from a template, an uploaded PDF, or a file URL.
  2. Wait for status document.uploadeddocument.draft (3–5 seconds).
  3. Send the document for electronic signature.
  4. Track signing status — via webhooks (recommended) or status polling.
  5. 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.


Why an API-first e-signature workflow

  • 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.


Requirements

Contributing

Issues and pull requests welcome — see CONTRIBUTING.md. Want an example we don't have yet? Request an example.

License

MIT — use these examples in your own projects freely.