> pandadoc
Create, send, and manage documents with e-signatures via PandaDoc API. Full document lifecycle management including templates, webhooks, and embedded signing.
curl "https://skillshub.wtf/tippyentertainment/skills/pandadoc?format=md"Provided by TippyEntertainment
PandaDoc API Integration
Complete integration with PandaDoc Public API for document creation, e-signature workflows, template management, and webhook automation.
Overview
PandaDoc is a document automation platform that enables:
- Document creation from templates or file uploads
- E-signature collection with workflow automation
- Template management and content libraries
- Webhook notifications for document events
- Embedded signing sessions for seamless integration
Authentication
PandaDoc supports two authentication methods:
API Key Authentication (Recommended for Server-Side)
Authorization: API-Key {{api_key}}
How to obtain:
- Log into PandaDoc account
- Navigate to Settings → API & Integrations
- Generate API Key (Sandbox for testing, Production for live)
Sandbox API Key: Use during development/free trial. Sender and recipient emails must be from the same domain.
Production API Key: Use for live integrations with real documents.
OAuth 2.0 Authentication (For Multi-Tenant Apps)
Authorization: Bearer {{oauth_token}}
OAuth Flow:
- Create an Application in PandaDoc Developer Portal
- Redirect user to authorization URL with
client_id,redirect_uri, andstate - User authorizes and is redirected back with
code - Exchange
codeforaccess_tokenandrefresh_token - Use
access_tokenin Authorization header
Base URL
https://api.pandadoc.com/public/v1
Rate Limits
- Sandbox: 100 requests/minute
- Production: 500 requests/minute
Document Status Values
| Value | Status | Description |
|---|---|---|
| 0 | document.draft | Document is in draft state |
| 1 | document.sent | Document has been sent |
| 2 | document.completed | Document is completed |
| 3 | document.uploaded | Document uploaded |
| 4 | document.error | Document has an error |
| 5 | document.viewed | Document has been viewed |
| 6 | document.waiting_approval | Document is waiting for approval |
| 7 | document.approved | Document has been approved |
| 8 | document.rejected | Document has been rejected |
| 9 | document.waiting_pay | Document is waiting for payment |
| 10 | document.paid | Document has been paid |
| 11 | document.voided | Document has been voided |
| 12 | document.declined | Document has been declined |
| 13 | document.external_review | Document is under external review |
Core Endpoints
Documents
List Documents
Retrieve all documents with filtering options.
Endpoint: GET /documents
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | No | Filter by specific document ID |
| template_id | string | No | Filter by parent template ID |
| form_id | string | No | Filter by parent form ID |
| q | string | No | Search by document name or reference number |
| membership_id | string | No | Filter by document owner's membership ID |
| contact_id | string | No | Filter by recipient or approver contact ID |
| status | integer | No | Filter by document status (see status values) |
| status__ne | integer | No | Exclude documents with specified status |
| folder_uuid | string | No | Filter by folder UUID |
| tag | string | No | Filter by document tag |
| metadata | object | No | Filter by metadata key-value pairs |
| completed_from | datetime | No | Include documents completed after this date |
| completed_to | datetime | No | Include documents completed before this date |
| created_from | datetime | No | Include documents created after this date |
| created_to | datetime | No | Include documents created before this date |
| modified_from | datetime | No | Include documents modified after this date |
| modified_to | datetime | No | Include documents modified before this date |
| deleted | boolean | No | Include only deleted documents when true |
| count | integer | No | Number of results per page (max: 100, default: 50) |
| page | integer | No | Page number (starts from 1) |
| order_by | string | No | Field to order results by |
Create Document from Template
Create a new document from an existing PandaDoc template.
Endpoint: POST /documents
Request Body:
| Parameter | Type | Required | Description |
|---|---|---|---|
| template_uuid | string | Yes | The ID of the template to use |
| name | string | No | Document name |
| folder_uuid | string | No | Folder UUID to store document |
| owner | object | No | Document owner (email or membership_id) |
| recipients | array | Yes | List of recipients |
| fields | object | No | Field values to pre-fill |
| tokens | array | No | Variables to populate |
| metadata | object | No | Custom key-value data |
| tags | array | No | Document tags |
Recipient Object:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes* | Recipient email (*or phone) | |
| phone | string | Yes* | Recipient phone (*or email) |
| first_name | string | No | Recipient first name |
| last_name | string | No | Recipient last name |
| role | string | No | Role name from template |
| signing_order | integer | No | Order for sequential signing |
Send Document
Send a document to recipients for signature.
Endpoint: POST /documents/{id}/send
Request Body:
| Parameter | Type | Required | Description |
|---|---|---|---|
| message | string | No | Email message to recipients |
| subject | string | No | Email subject line |
| silent | boolean | No | If true, disables email notifications |
| sender | object | No | Sender email or membership_id |
Important Notes:
- Document must be in
document.draftstatus - After creation, documents remain in
document.uploadedstatus for 3-5 seconds - Use Document Status endpoint or Webhooks to check when ready
Download Document
Download a document as PDF.
Endpoint: GET /documents/{id}/download
Download Completed Document
Download the completed (signed) version.
Endpoint: GET /documents/{id}/download-completed
Delete Document
Delete a document.
Endpoint: DELETE /documents/{id}
Update Document
Update document properties.
Endpoint: PATCH /documents/{id}
Templates
List Templates
Retrieve all templates.
Endpoint: GET /templates
Create Template from File Upload
Create a new template from a PDF or DOCX file.
Endpoint: POST /templates
Get Template Details
Retrieve template information.
Endpoint: GET /templates/{id}
Delete Template
Delete a template.
Endpoint: DELETE /templates/{id}
Webhooks
List Webhook Subscriptions
Retrieve all webhook subscriptions.
Endpoint: GET /webhook-subscriptions
Create Webhook Subscription
Subscribe to document events.
Endpoint: POST /webhook-subscriptions
Request Body:
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Webhook endpoint URL |
| events | array | Yes | Array of event types to subscribe to |
| shared_key | string | No | Secret key for webhook signature verification |
Available Events:
| Event | Description |
|---|---|
| document_created | Document created |
| document_state_changed | Document status changed |
| document_deleted | Document deleted |
| document_updated | Document updated |
| document_creation_failed | Document creation failed |
| recipient_completed | Recipient completed signing |
| document_completed_pdf_ready | Completed PDF available |
| quote_updated | Quote updated |
| template_created | Template created |
| template_updated | Template updated |
| template_deleted | Template deleted |
Webhook Payload Structure
Headers:
Content-Type: application/json
X-PandaDoc-Signature: sha256=...
X-PandaDoc-Timestamp: 2024-01-15T10:30:00Z
Verify Webhook Authenticity
Node.js Example:
const crypto = require('crypto');
function verifyWebhook(payload, signature, sharedKey) {
const expectedSignature = 'sha256=' +
crypto
.createHmac('sha256', sharedKey)
.update(JSON.stringify(payload))
.digest('hex');
return signature === expectedSignature;
}
Embedded Signing
Create Document Session for Embedded Sign
Create an embedded signing session for in-app signing.
Endpoint: POST /documents/{id}/session/embedded-sign
Request Body:
| Parameter | Type | Required | Description |
|---|---|---|---|
| recipient | string | Yes | Recipient email or ID |
| redirect_url | string | No | URL to redirect after signing |
Document Recipients
Add Document Recipient
Add a recipient to a document.
Endpoint: POST /documents/{id}/recipients
Update Document Recipient
Update recipient information.
Endpoint: PATCH /documents/{id}/recipients/{recipient_id}
Delete Document Recipient
Remove a recipient from a document.
Endpoint: DELETE /documents/{id}/recipients/{recipient_id}
Folders
List Document Folders
Endpoint: GET /documents/folders
Create Document Folder
Endpoint: POST /documents/folders
Contacts
List Contacts
Endpoint: GET /contacts
Create Contact
Endpoint: POST /contacts
Step-by-Step Workflows
Workflow 1: Create and Send Document for E-Signature
- List available templates:
GET /templates - Create document from template:
POST /documents - Wait for document to be ready (poll status or use webhook)
- Send document for signature:
POST /documents/{id}/send - Monitor via webhook for completion event
- Download completed document:
GET /documents/{id}/download-completed
Workflow 2: Embedded Signing Integration
- Create document from template:
POST /documents - Send document silently:
POST /documents/{id}/sendwithsilent: true - Create embedded signing session:
POST /documents/{id}/session/embedded-sign - Embed the returned embed_url in an iframe
- Handle redirect to completion URL
- Download completed document via API
Workflow 3: Webhook Integration
- Create webhook subscription:
POST /webhook-subscriptions - Create server endpoint to receive webhooks
- Verify webhook signature using shared_key
- Process webhook payload based on event type
Error Handling
Common HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Authentication error - Invalid API key |
| 403 | Permission error - Insufficient permissions |
| 404 | Not found - Resource doesn't exist |
| 409 | Conflict - Resource state conflict |
| 429 | Too Many Requests - Rate limit exceeded |
Best Practices
Performance
- Use
date_createdordering for consistent pagination results - Include date ranges when filtering large datasets
- Limit count to 100 or less per request
- Use webhooks instead of polling for status changes
- Cache template IDs to avoid repeated template listing
Document Creation
- Wait 3-5 seconds after creation before sending
- Use Document Status endpoint or webhooks to check readiness
- Pre-fill fields using the fields parameter for better UX
- Set signing order for sequential signature workflows
Webhooks
- Always verify signatures using the shared_key
- Return 200 status quickly - process webhooks asynchronously
- Handle duplicate events - webhooks may be delivered multiple times
- Use idempotent processing for reliability
Security
- Store API keys securely - never expose in client-side code
- Use OAuth 2.0 for multi-tenant applications
- Use sandbox keys for development/testing
- Rotate API keys periodically
SDKs and Libraries
Official SDKs
- Python:
pip install pandadoc-api-client - Node.js:
npm install @pandadoc/node-client - Ruby:
gem install pandadoc_api
Postman Collection
Import the official PandaDoc Postman collection from the Developer Portal.
Support
- Documentation: https://developers.pandadoc.com/
- API Reference: https://developers.pandadoc.com/reference/about
- Support: Contact via Developer Portal
- Changelog: https://developers.pandadoc.com/changelog
Parameters
- action: The action to perform (create_document, list_documents, send_document, create_webhook, list_templates, get_document, download_document, create_template, list_contacts, etc.)
- params: JSON string of parameters specific to the action (document_id, template_uuid, recipients, fields, webhook_url, events, etc.)
Returns
- JSON response from PandaDoc API with document IDs, status, download URLs, webhook subscription confirmation, or error messages with details.
Usage Examples
Create Document from Template
action: create_document
params: {
"template_uuid": "iMymdDd9XFD3HyxP5VD67Q",
"name": "NDA - Client",
"recipients": [{"email": "client@example.com", "role": "Signer"}]
}
Send Document
action: send_document
params: {
"document_id": "xyz789abc",
"subject": "Please sign",
"message": "Review and sign the attached document."
}
Create Webhook
action: create_webhook
params: {
"url": "https://your-server.com/webhooks/pandadoc",
"events": ["document_state_changed", "recipient_completed"]
}
> related_skills --same-repo
> worldclass-tailwind-v4-visual-design
A top-tier product/UI designer skill that uses Tailwind v4 plus Google Gemini Nano Banana image models to craft visually stunning, “award‑winning” marketing sites and apps with strong art direction, motion, and systems thinking.
> wasm-spa-autofix-react-imports
Meticulously detect and fix missing React/TSX imports, undefined components, and bundler runtime errors in the WASM SPA build/preview pipeline. Ensures JSX components, icons, and hooks are properly imported or defined before running the browser preview, so the runtime safety-net rarely triggers.
> vite-webcontainer-developer
Debug and auto-fix Vite projects running inside WebContainers: resolve mount/root issues, alias/path errors, missing scripts, and other common dev-time problems so the app boots cleanly.
> vite-config-react19-spa-expert
Diagnose and fix Vite + React 19 configuration issues for TypeScript SPA and WASM preview builds. Specializes in React 19’s JSX runtime, @vitejs/plugin-react, path aliases, SPA routing, and dev-server behavior so the app and in-browser preview bundle cleanly without manual trial-and-error.