# Template Updated Webhook This webhook is triggered when an existing template is updated. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "PandaDoc Webhooks", "termsOfService": "https://www.pandadoc.com/master-services-agreement/", "contact": { "name": "PandaDoc API Support", "url": "https://developers.pandadoc.com/", "email": "api-track@pandadoc.com" }, "license": { "name": "MIT" }, "version": "0.0.0-a.1" }, "servers": [ { "url": "https://api.pandadoc.com", "description": "Public API" } ], "webhooks": { "Content Library Item Created": { "post": { "summary": "Content Library Item Created Webhook", "operationId": "handleContentLibraryItemCreated", "tags": [ "Content Library" ], "description": "This webhook is triggered when a new content library item (CLI) is\nsuccessfully created and processed in PandaDoc. The webhook delivers\ncomprehensive information about the newly created item, including its\ncreation metadata and current status.\n\nThis event is useful for:\n- Synchronizing content library items with external systems\n- Triggering automated workflows when new templates become available\n- Maintaining audit logs of content library changes\n- Notifying teams about new reusable content components\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive details about the newly created content library item. The payload includes essential metadata captured at the time of creation, including creator information, timestamps, and version details.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier for content library item creation", "enum": [ "content_library_item_created" ], "example": "content_library_item_created" }, "data": { "type": "object", "description": "Complete content library item information captured at creation time", "required": [ "id", "name", "created_by", "date_created", "version" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the content library item", "pattern": "^[a-zA-Z0-9]{22}$", "example": "fPTVhVutvn7zPFF6PSGsCd" }, "name": { "type": "string", "description": "Display name of the content library item", "minLength": 1, "maxLength": 255, "example": "Sample Content Library Item" }, "created_by": { "type": "object", "description": "Information about the user who created the content library item", "required": [ "id", "email" ], "properties": { "id": { "type": "string", "description": "Unique user identifier of the creator", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "Email address of the creator", "example": "fname.lname@pandadoc.com" } } }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the content library item was created", "example": "2025-07-08T22:39:58.794117Z" }, "version": { "type": "number", "description": "Version number of the content library item (incremented on updates)", "minimum": 1, "example": 2 }, "status": { "type": "string", "description": "Current processing status of the content library item. Items are typically in 'cli.PROCESSED' status when this webhook fires.", "enum": [ "cli.UPLOADED", "cli.PROCESSED", "cli.ERROR" ], "example": "cli.PROCESSED" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the content library item was last modified. For newly created items, this will be close to the date_created timestamp.", "example": "2025-07-08T22:39:58.800000Z" } } } } }, "example": [ { "event": "content_library_item_created", "data": { "id": "fPTVhVutvn7zPFF6PSGsCd", "name": "Sample Content Library Item", "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com" }, "date_created": "2025-07-08T22:39:58.794117Z", "version": 2 } } ] } } } }, "responses": { "200": { "description": "Success" } } } }, "Content Library Item Creation Failed": { "post": { "summary": "Content Library Item Creation Failed Webhook", "operationId": "handleContentLibraryItemCreationFailed", "tags": [ "Content Library" ], "description": "This webhook is triggered when the creation of a content library item\n(CLI) fails during the asynchronous processing phase in PandaDoc. The\nwebhook provides comprehensive error information to help diagnose and\nresolve creation issues.\n\nContent library item creation can fail for various reasons:\n- **Validation Errors**: Missing required fields, invalid data formats, or incorrect field configurations\n- **Process Errors**: Document converter service cannot process the uploaded file (broken/locked PDFs, unsupported formats, file size limits)\n- **System Errors**: Internal processing failures or service unavailability processing\n\nThis event is useful for:\n- Implementing error handling and retry logic in automated workflows\n- Providing user feedback about failed content library item creation attempts\n- Monitoring and debugging content upload processes\n- Maintaining audit logs of failed operations\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive error details about the failed content library item creation attempt. The payload includes the item identifier and structured error information to facilitate debugging and error handling in your application.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier for content library item creation failures", "enum": [ "content_library_item_creation_failed" ], "example": "content_library_item_creation_failed" }, "data": { "type": "object", "description": "Error details and context for the failed content library item creation", "required": [ "id", "error" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the content library item that failed to be created", "pattern": "^[a-zA-Z0-9]{22}$", "example": "qU7UU4WuaktNicFVP9s8vU" }, "name": { "type": "string", "description": "Display name of the content library item that was being created. This field may be present to provide additional context about the failed item.", "minLength": 1, "maxLength": 255, "example": "Sample Pricing Table" }, "error": { "type": "object", "description": "Structured error information providing details about the failure", "required": [ "type", "detail" ], "properties": { "type": { "type": "string", "description": "Categorization of the error type that occurred during content library item creation. Common values include validation_error, process_error, and system_error.", "enum": [ "validation_error", "process_error", "system_error" ], "example": "process_error" }, "detail": { "type": "string", "description": "Human-readable detailed description of the specific error encountered. This provides actionable information for troubleshooting the failure.", "minLength": 1, "example": "PDF content hasn't been processed: document is broken or locked" } } } } } } }, "example": [ { "event": "content_library_item_creation_failed", "data": { "id": "qU7UU4WuaktNicFVP9s8vU", "error": { "type": "process_error", "detail": "PDF content hasn't been processed: document is broken or locked" } } } ] } } } }, "responses": { "200": { "description": "Success" } } } }, "Document Creation Failed": { "post": { "summary": "Document Creation Failed Webhook", "operationId": "handleDocumentCreationFailed", "tags": [ "Documents" ], "description": "This webhook is triggered when document creation fails during the\nasynchronous processing phase in PandaDoc. The webhook provides\ncomprehensive error information to help diagnose and resolve document\ncreation issues.\n\nDocument creation can fail for various reasons:\n- **Validation Errors**: Missing required fields, invalid field tags, empty roles, or field tags not declared in the payload\n- **Process Errors**: Document converter service cannot process the uploaded file (broken/locked PDFs, unsupported formats, file size limits)\n- **Field Tag Issues**: Invalid field positions, missing role assignments, or field tags with negative positions\n- **System Errors**: Internal processing failures or service unavailability\n\nThis event is useful for:\n- Implementing error handling and retry logic in document creation workflows\n- Providing user feedback about failed document creation attempts\n- Monitoring and debugging document upload processes\n- Maintaining audit logs of failed operations\n- Identifying PDF issues that require flattening or field tag corrections\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive error details about the failed document creation attempt. The payload includes the document identifier and structured error information to facilitate debugging and error handling in your application.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier for document creation failures", "enum": [ "document_creation_failed" ], "example": "document_creation_failed" }, "data": { "type": "object", "description": "Error details and context for the failed document creation", "required": [ "id", "error" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the document that failed to be created", "pattern": "^[a-zA-Z0-9]{22}$", "example": "dgWkzNt2HKT7NzbzVeMsDb" }, "name": { "type": "string", "description": "Display name of the document that was being created. This field may be present to provide additional context about the failed document.", "minLength": 1, "maxLength": 255, "example": "Annual Report Template" }, "error": { "type": "object", "description": "Structured error information providing details about the failure", "required": [ "type", "detail" ], "properties": { "type": { "type": "string", "description": "Categorization of the error type that occurred during document creation. Common values include validation_error for field/payload issues and process_error for file processing failures.", "enum": [ "validation_error", "process_error", "system_error" ], "example": "validation_error" }, "detail": { "type": "string", "description": "Human-readable detailed description of the specific error encountered. For validation errors, this typically includes information about missing fields or invalid field tags. This provides actionable information for troubleshooting the failure.", "minLength": 1, "example": "All field tags within PDF must be declared within 'fields' object of the JSON Payload. No field with optId='email' found in 'fields' object, fields passed were ['name', 'phone']." } } } } } } }, "example": [ { "event": "document_creation_failed", "data": { "id": "dgWkzNt2HKT7NzbzVeMsDb", "name": "Annual Report Template", "error": { "type": "validation_error", "detail": "All field tags within PDF must be declared within 'fields' object of the JSON Payload. No field with optId='email' found in 'fields' object, fields passed were ['name', 'phone']." } } } ] } } } }, "responses": { "200": { "description": "Success" } } } }, "Document State Changed": { "post": { "summary": "Document State Changed Webhook", "operationId": "handleDocumentStateChanged", "tags": [ "Documents" ], "description": "Triggered when a document transitions between different states in its lifecycle.\n\n## Document States\n\nCommon document state transitions include:\n\n### Creation & Sending\n- **document.draft** - Document creation and processing is complete\n- **document.sent** - Document has been sent to recipients\n- **document.viewed** - Document has been opened by a recipient\n\n### Approval Workflow\n- **document.waiting_approval** - Document is pending approval workflow\n- **document.approved** - Document has been approved\n- **document.rejected** - Document has been rejected\n\n### Payment Processing\n- **document.waiting_pay** - Document is pending payment\n- **document.paid** - Document payment has been completed\n\n### Completion\n- **document.completed** - Document has been fully signed/completed\n- **document.cancelled** - Document has been cancelled\n- **document.declined** - Document has been declined by a recipient\n\n## Use Cases\n\nThis webhook is ideal for:\n\n- **Process Automation** - Trigger business workflows based on document state\n- **System Integration** - Synchronize document status with external systems\n- **Workflow Management** - Implement approval processes and notifications\n- **Analytics & Reporting** - Track document completion metrics\n- **Real-time Monitoring** - Monitor document lifecycle changes\n\n## Important Considerations\n\n### Recipient Shared Links\n> ⚠️ **Known Limitation**: The `shared_link` field in the `recipients` array may be empty in webhook payloads due to asynchronous processing.\n>\n> **Recommended Solution**: Use the [Document Details API](https://developers.pandadoc.com/reference/document-details) endpoint (`GET /public/v1/documents/{id}/details`) to retrieve complete recipient information when `shared_link` is needed.\n\n### Payload Structure\n> 📝 **Note**: The webhook payload structure mirrors the Document Details API response, providing comprehensive document information at the time of state change.\n\n### Security\n> 🔒 **Security**: All webhook requests include an HMAC-SHA256 signature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive document details captured at the time of state change. The payload structure includes complete document information, recipient status, field values, pricing data, and metadata.", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier for document state changes", "enum": [ "document_state_changed" ], "example": "document_state_changed" }, "data": { "type": "object", "description": "Complete document information about the document at the time of state change.", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "recipients", "version", "grand_total" ], "properties": { "id": { "type": "string", "description": "Unique document identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "f9CbJKS4ZAs6nU629cuowb" }, "name": { "type": "string", "description": "Document display name", "minLength": 1, "maxLength": 255, "example": "Digital Marketing Proposal" }, "status": { "type": "string", "description": "Current document status indicating its lifecycle stage. Status changes trigger this webhook event.", "enum": [ "document.draft", "document.sent", "document.viewed", "document.waiting_approval", "document.approved", "document.rejected", "document.waiting_pay", "document.paid", "document.completed", "document.cancelled", "document.declined" ], "example": "document.completed" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was created", "example": "2024-07-08T15:36:09.600947Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when document was last modified. This reflects changes to recipients and document status.", "example": "2024-07-08T15:43:53.918819Z" }, "date_completed": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was completed", "example": "2024-07-08T15:43:53.877522Z" }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent to recipients", "example": "2024-07-08T15:41:23.351853Z" }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "Document expiration timestamp", "example": "2024-09-06T15:43:36.297737Z" }, "autonumbering_sequence_name": { "type": [ "null", "string" ], "description": "Name of the autonumbering sequence used for the document" }, "created_by": { "description": "Information about the user who created the document", "required": [ "id", "email", "first_name", "last_name", "avatar", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "pandaDoc@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "Panda" }, "last_name": { "type": "string", "description": "User's last name", "example": "Doc" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL" }, "membership_id": { "type": "string", "description": "User membership identifier", "example": "RyMNXBjBPRppw56TfYBrXi" } } }, "template": { "type": [ "object", "null" ], "description": "Information about the template used for the document", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Sample Template" } } }, "version": { "type": "string", "description": "Document version number", "example": "2" }, "grand_total": { "type": "object", "description": "Total amount for the document", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total amount value", "example": "29.99" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "EUR" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "pandaDoc@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "Panda" }, "last_name": { "type": "string", "description": "User's last name", "example": "Doc" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL" } } }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "tags": { "type": "array", "description": "Tags associated with the document", "items": { "type": "string" }, "example": [ "tag1", "marketing" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "pricing": { "$ref": "#/components/schemas/DocumentPricing" }, "products": { "type": "array", "description": "Product information in the document", "items": { "$ref": "#/components/schemas/ProductInformation" } } } } } }, "example": [ { "event": "document_state_changed", "data": { "id": "f9CbJKS4ZAs6nU629cuowb", "name": "Digital Marketing Proposal", "status": "document.completed", "date_created": "2024-07-08T15:36:09.600947Z", "date_modified": "2024-07-08T15:43:53.918819Z", "date_completed": "2024-07-08T15:43:53.877522Z", "date_sent": "2024-07-08T15:41:23.351853Z", "expiration_date": "2024-09-06T15:43:36.297737Z", "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "pandaDoc@pandadoc.com", "first_name": "Panda", "last_name": "Doc", "avatar": null, "membership_id": "RyMNXBjBPRppw56TfYBrXi" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Sample Template" }, "version": "2", "grand_total": { "amount": "29.99", "currency": "EUR" }, "recipients": [ { "id": "8KAZvGRL3W4u44a4fyDoeH", "first_name": "Recipient First Name", "last_name": "Recipient Last Name", "email": "test@pandadoc.com", "phone": "", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": true, "signing_order": null, "contact_id": "HzXnuyNraSXMhXchYjUmHJ", "shared_link": "https://app.pandadoc.com/document/15d4b481384b652a298530ddc7023bfc07a67d59", "signature_date": "2024-07-08T15:43:53.800135Z", "type": "recipient" } ], "sent_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "pandaDoc@pandadoc.com", "first_name": "Panda", "last_name": "Doc", "avatar": null }, "metadata": { "document__created_via_public_api": "true", "document__creation_source": "public api" }, "tokens": [], "fields": [ { "uuid": "f03e22f3-b3a8-4783-8b26-e43880ef87bf", "field_id": "signature_f03e22f3-b3a8-4783-8b26-e43880ef87bf", "name": "Signature", "title": "", "placeholder": "Signature", "type": "signature", "value": {}, "assigned_to": { "id": "8KAZvGRL3W4u44a4fyDoeH", "first_name": "Recipient First Name", "last_name": "Recipient Last Name", "email": "test@pandadoc.com", "recipient_type": "signer", "has_completed": true, "role": "Client", "roles": [ "Client" ], "type": "recipient" } } ], "tags": [ "tag1" ], "linked_objects": [], "pricing": {}, "products": [] } } ] } } } }, "responses": { "200": { "description": "Successful response indicating the webhook was received and processed", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Document state changed webhook received successfully" } } } } } } } } }, "Document Section Added": { "post": { "summary": "Document Section Added Webhook", "operationId": "handleDocumentSectionAdded", "tags": [ "Documents" ], "description": "This webhook is triggered when a new section is added to a document in PandaDoc. It notifies your endpoint with the details of the newly added section.", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Details about the added document section.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier", "example": "document_section_added" }, "data": { "type": "object", "required": [ "id", "name", "created_by", "section_id", "workspace_id" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the document section" }, "name": { "type": "string", "description": "Document name" }, "created_by": { "type": "object", "required": [ "id", "email" ], "properties": { "id": { "type": "string", "description": "User ID of the creator" }, "email": { "type": "string", "description": "Email address of the creator" } } }, "section_id": { "type": "string", "description": "Unique identifier for the section within the document" }, "workspace_id": { "type": "string", "description": "ID of the workspace where the document is located" } } } } }, "example": [ { "event": "document_section_added", "data": { "id": "VA37emLBvhjZ9WDAtEfePC", "name": "Document from PandaDoc Template", "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com" }, "section_id": "8BDXix4epYpcAwUBrZ8Ayd", "workspace_id": "Rv73aDzmmKq2DCv72LnhTk" } } ] } } } }, "responses": { "200": { "description": "Success" } } } }, "Document Updated": { "post": { "summary": "Document Updated Webhook", "operationId": "handleDocumentUpdated", "tags": [ "Documents" ], "description": "This webhook is triggered when a document is updated. Unlike the\n`document_state_changed` event which tracks all status transitions,\nthis event specifically indicates that the document has been modified \nand reverted to a draft state, allowing for further edits or updates.\n\nThis event is useful for:\n- Syncing document updates with external systems\n- Audit logging and compliance tracking for document modifications\n- Triggering notifications or workflows when documents are edited\n- Maintaining version control and change history\n- Implementing approval workflows for document changes\n\n**Note**: The webhook payload structure is synchronized with the\nDocument State Changed webhook and partially mirrors the Document\nDetails API response, providing comprehensive document information\ncaptured at the time of update.\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive document details captured at the time of update. The payload structure is synchronized with the Document State Changed webhook and includes complete document information, recipient status, field values, pricing data, and metadata reflecting the current state after modifications.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "description": "Event type identifier for document updates", "enum": [ "document_updated" ], "example": "document_updated" }, "data": { "type": "object", "description": "Complete document information synchronized with Document State Changed webhook structure. Contains comprehensive data about the document captured at the time of update.", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "recipients", "version", "grand_total" ], "properties": { "id": { "type": "string", "description": "Unique document identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "tGRhZTANFmeKKqoyvs4zzX" }, "name": { "type": "string", "description": "Document display name", "minLength": 1, "maxLength": 255, "example": "New document" }, "status": { "type": "string", "description": "Current document status after the update. Documents returned to draft status trigger this webhook event.", "enum": [ "document.draft", "document.sent", "document.viewed", "document.waiting_approval", "document.approved", "document.rejected", "document.waiting_pay", "document.paid", "document.completed", "document.cancelled", "document.declined" ], "example": "document.draft" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was originally created", "example": "2025-06-13T15:59:46.798660Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when document metadata was last modified. This reflects the time of the update that triggered this webhook.", "example": "2025-06-16T11:57:46.616589Z" }, "date_completed": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was completed (if applicable)", "example": "2024-07-08T15:43:53.877522Z" }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent to recipients (if applicable)", "example": "2024-07-08T15:41:23.351853Z" }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "Document expiration timestamp", "example": "2025-08-15T11:57:35.146922Z" }, "autonumbering_sequence_name": { "type": [ "null", "string" ], "description": "Name of the autonumbering sequence used for the document" }, "created_by": { "type": "object", "description": "Information about the user who originally created the document", "required": [ "id", "email", "first_name", "last_name", "avatar", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL" }, "membership_id": { "type": "string", "description": "User membership identifier", "example": "TcZLMBcF7gvMxAZGn8SofS" } } }, "template": { "type": [ "object", "null" ], "description": "Information about the template used for the document", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Sample Template" } } }, "version": { "type": "string", "description": "Document version number", "example": "2" }, "grand_total": { "type": "object", "description": "Total amount for the document", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total amount value", "example": "0.00" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "EUR" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "pandaDoc@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "Panda" }, "last_name": { "type": "string", "description": "User's last name", "example": "Doc" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL", "example": null } } }, "tags": { "type": "array", "description": "Tags associated with the document", "items": { "type": "string" }, "example": [ "updated", "marketing" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "products": { "type": "array", "description": "Product information in the document", "items": { "$ref": "#/components/schemas/ProductInformation" } }, "pricing": { "$ref": "#/components/schemas/DocumentPricing" } } } } }, "example": [ { "event": "document_updated", "data": { "id": "tGRhZTANFmeKKqoyvs4zzX", "name": "Marketing Proposal - Updated", "status": "document.draft", "date_created": "2025-06-13T15:59:46.798660Z", "date_modified": "2025-06-16T11:57:46.616589Z", "date_completed": null, "date_sent": null, "expiration_date": "2025-08-15T11:57:35.146922Z", "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null, "membership_id": "TcZLMBcF7gvMxAZGn8SofS" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Sample Template" }, "version": "3", "grand_total": { "amount": "1250.00", "currency": "EUR" }, "recipients": [ { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+1-555-0123", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": false, "signing_order": 1, "contact_id": "gEgusViKyvWn5UTh8yRBkT", "shared_link": "", "signature_date": null, "type": "recipient" } ], "sent_by": null, "tags": [ "updated", "marketing", "proposal" ], "linked_objects": [], "metadata": { "document__updated_via_public_api": "true", "project_id": "PROJ-2024-001" }, "tokens": [ { "name": "Client.Name", "value": "John Doe" }, { "name": "Document.Total", "value": "€1,250.00" } ], "fields": [ { "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "field_id": "client_signature", "name": "Client Signature", "title": "Please sign here", "placeholder": "Digital Signature", "type": "signature", "value": null, "assigned_to": { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "recipient_type": "signer", "has_completed": false, "role": "Client", "roles": [ "Client" ], "type": "recipient" } } ], "products": [], "pricing": {} } } ] } } } }, "responses": { "200": { "description": "Successful response indicating the webhook was received", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Document updated webhook received successfully" } } } } } } } } }, "Document Deleted": { "post": { "summary": "Document Deleted Webhook", "operationId": "handleDocumentDeleted", "tags": [ "Documents" ], "description": "This webhook is triggered when a document has been removed.\n\nThe webhook is sent to your configured endpoint URL when a document has been removed. This event provides complete document information \ncaptured at the time of deletion for:\n- Synchronizing document deletions with external systems\n- Audit logging and compliance tracking\n- Cleanup operations in dependent systems\n- Data archival and recovery procedures\n\n**Security Note**: All webhook requests include an HMAC-SHA256 signature for verification \nusing your webhook shared secret.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Complete document information captured at the time of deletion. Contains all document data to facilitate external system synchronization and audit logging.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "document_deleted" ], "description": "Event type identifier indicating document deletion" }, "data": { "type": "object", "description": "Complete document information captured at the time of deletion. This includes all \ndocument metadata, recipient information, and current state to support external \nsystem synchronization and audit requirements.\n", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "version", "grand_total", "recipients", "tags", "linked_objects" ], "properties": { "id": { "type": "string", "description": "Unique document identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "cstceBmys7tgiWer9FfPy9" }, "name": { "type": "string", "description": "Document display name", "example": "Contract Agreement - Final Version" }, "status": { "type": "string", "description": "Document status at the time of deletion", "enum": [ "document.draft", "document.sent", "document.viewed", "document.waiting_approval", "document.approved", "document.rejected", "document.waiting_pay", "document.paid", "document.completed", "document.cancelled", "document.expired" ], "example": "document.completed" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was originally created", "example": "2025-06-13T15:59:46.798660Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was last modified", "example": "2025-07-15T10:30:22.145891Z" }, "date_completed": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was completed (null if not completed)", "example": "2025-07-15T09:45:18.332156Z" }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent (null if never sent)", "example": "2025-06-14T08:30:15.221847Z" }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document expires (null if no expiration)", "example": "2025-08-15T11:57:35.146922Z" }, "autonumbering_sequence_name": { "type": [ "string", "null" ], "description": "Name of the autonumbering sequence used (null if not used)", "example": null }, "created_by": { "type": "object", "description": "Information about the user who created the document", "required": [ "id", "email", "first_name", "last_name", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL (null if no avatar)", "example": null }, "membership_id": { "type": "string", "description": "Membership identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "TcZLMBcF7gvMxAZGn8SofS" } } }, "template": { "type": [ "object", "null" ], "description": "Template information (null for documents not created from template)", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Contract Template v2.1" } } }, "version": { "type": "string", "description": "Document version number (increments with each modification)", "example": "5" }, "grand_total": { "type": "object", "description": "Total monetary amount for the document", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total amount value", "example": "1250.00" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "EUR" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document (null if never sent)", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "pandaDoc@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "Panda" }, "last_name": { "type": "string", "description": "User's last name", "example": "Doc" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL", "example": null } } }, "tags": { "type": "array", "description": "Tags associated with the document for categorization and filtering", "items": { "type": "string" }, "example": [ "finalized", "contract", "archived" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "products": { "type": "array", "description": "Product information included in the document", "items": { "$ref": "#/components/schemas/ProductInformation" } }, "pricing": { "$ref": "#/components/schemas/DocumentPricing" } } } } }, "example": [ { "event": "document_deleted", "data": { "id": "cstceBmys7tgiWer9FfPy9", "name": "Contract Agreement - Final Version", "status": "document.completed", "date_created": "2025-06-13T15:59:46.798660Z", "date_modified": "2025-07-15T10:30:22.145891Z", "date_completed": "2025-07-15T09:45:18.332156Z", "date_sent": "2025-06-14T08:30:15.221847Z", "expiration_date": null, "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null, "membership_id": "TcZLMBcF7gvMxAZGn8SofS" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Contract Template v2.1" }, "version": "5", "grand_total": { "amount": "1250.00", "currency": "EUR" }, "recipients": [ { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+1-555-0123", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": true, "signing_order": 1, "contact_id": "gEgusViKyvWn5UTh8yRBkT", "shared_link": "https://app.pandadoc.com/document/15d4b481384b652a298530ddc7023bfc07a67d59", "signature_date": "2025-07-15T09:45:18.332156Z", "type": "recipient" } ], "sent_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null }, "tags": [ "finalized", "contract", "archived" ], "linked_objects": [], "metadata": { "document__completed_via_api": "true", "project_id": "PROJ-2024-001", "contract_type": "service_agreement" }, "tokens": [ { "name": "Client.Name", "value": "John Doe" }, { "name": "Document.Total", "value": "€1,250.00" }, { "name": "Contract.Number", "value": "CNT-2024-0042" } ], "fields": [ { "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "field_id": "client_signature", "name": "Client Signature", "title": "Client Authorization", "placeholder": "Digital Signature", "type": "signature", "value": "John Doe", "assigned_to": { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "recipient_type": "signer", "has_completed": true, "role": "Client", "roles": [ "Client" ], "type": "recipient" } } ], "products": [], "pricing": {} } } ] } } } }, "responses": { "200": { "description": "Successful response indicating the webhook was received", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } } } } }, "PDF of Completed Document Available for Download": { "post": { "summary": "PDF of Completed Document Available for Download Webhook", "operationId": "PdfOfCompletedDocumentAvailableForDownload", "tags": [ "Documents" ], "description": "This webhook is triggered when a document has been completed and a PDF\nhas been generated and securely saved to PandaDoc's e-vault. The\nwebhook delivers comprehensive document information and signals that\nthe completed PDF is ready for download.\n\n**Important Note**: This event indicates that the document workflow is\nfully complete and a verifiable, digitally sealed PDF has been\ngenerated. The PDF can be downloaded using the Download Protected\nDocument API endpoint.\n\nThis event is useful for:\n- Downloading completed documents via the Download Protected Document endpoint\n- Triggering automated document archival and storage workflows\n- Initiating post-completion business processes (invoicing, fulfillment, etc.)\n- Audit logging and compliance tracking for completed documents\n- Notifying stakeholders about document completion and availability\n- Implementing automated backup and document management systems\n\n**PDF Download**: Use the Download Protected Document endpoint \n(`/public/v1/documents/{id}/download-protected`) to retrieve the\ncompleted, digitally sealed PDF from the e-vault.\n\n**Note**: The webhook payload structure is partially mirrors the\nDocument Details API response, providing comprehensive document\ninformation captured when the PDF becomes available.\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your webhook shared secret.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive document details captured when the completed PDF becomes available for download. The payload structure is synchronized with the Document Updated webhook and includes complete document information, recipient status, field values, pricing data, and metadata reflecting the final completed state.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "document_completed_pdf_ready" ], "description": "Event type identifier for PDF completion and availability", "example": "document_completed_pdf_ready" }, "data": { "type": "object", "description": "Complete document information synchronized with Document Updated webhook structure. Contains comprehensive data about the document captured when the PDF becomes available, including final completion details and download readiness.", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "recipients", "version", "grand_total", "tags", "linked_objects" ], "properties": { "id": { "type": "string", "description": "Unique document identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "tGRhZTANFmeKKqoyvs4zzX" }, "name": { "type": "string", "description": "Document display name", "minLength": 1, "maxLength": 255, "example": "Service Contract - Fully Executed" }, "status": { "type": "string", "description": "Final document status (typically 'document.completed')", "enum": [ "document.completed", "document.paid" ], "example": "document.completed" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was originally created", "example": "2025-06-13T15:59:46.798660Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when document metadata was last modified", "example": "2025-07-16T11:57:46.616589Z" }, "date_completed": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was completed and PDF generated", "example": "2025-07-16T14:45:23.887653Z" }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent to recipients", "example": "2025-06-14T08:30:15.221847Z" }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document expires (null if no expiration)", "example": null }, "autonumbering_sequence_name": { "type": [ "string", "null" ], "description": "Name of the autonumbering sequence used for the document (null if not used)", "example": null }, "created_by": { "type": "object", "description": "Information about the user who originally created the document", "required": [ "id", "email", "first_name", "last_name", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL (null if no avatar)", "example": null }, "membership_id": { "type": "string", "description": "User membership identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "TcZLMBcF7gvMxAZGn8SofS" } } }, "template": { "type": [ "object", "null" ], "description": "Template information (null for documents not created from template)", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Service Contract Template" } } }, "version": { "type": "string", "description": "Document version number (final version at completion)", "example": "3" }, "grand_total": { "type": "object", "description": "Total monetary amount for the completed document", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total amount value", "example": "5000.00" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "USD" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL", "example": null } } }, "tags": { "type": "array", "description": "Tags associated with the completed document", "items": { "type": "string" }, "example": [ "completed", "contract", "executed" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "ref_number": { "type": [ "string", "null" ], "description": "Document reference number (null if not assigned)", "example": "SERV-2025-0089" }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "products": { "type": "array", "description": "Product information included in the completed document", "items": { "$ref": "#/components/schemas/ProductInformation" } }, "pricing": { "$ref": "#/components/schemas/DocumentPricing" } } } } }, "example": [ { "event": "document_completed_pdf_ready", "data": { "id": "tGRhZTANFmeKKqoyvs4zzX", "name": "Service Contract - Fully Executed", "status": "document.completed", "date_created": "2025-06-13T15:59:46.798660Z", "date_modified": "2025-07-16T11:57:46.616589Z", "date_completed": "2025-07-16T14:45:23.887653Z", "date_sent": "2025-06-14T08:30:15.221847Z", "expiration_date": null, "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null, "membership_id": "TcZLMBcF7gvMxAZGn8SofS" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Service Contract Template" }, "version": "3", "grand_total": { "amount": "5000.00", "currency": "USD" }, "recipients": [ { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+1-555-0123", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": true, "signing_order": 1, "contact_id": "gEgusViKyvWn5UTh8yRBkT", "shared_link": "https://app.pandadoc.com/document/15d4b481384b652a298530ddc7023bfc07a67d59", "signature_date": "2025-07-16T14:32:18.445621Z", "type": "recipient" }, { "id": "cXvY2PnM8QsL7WaD9kF3eH", "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "phone": "+1-555-0456", "recipient_type": "signer", "role": "Company Representative", "roles": [ "Company Representative" ], "has_completed": true, "signing_order": 2, "contact_id": null, "shared_link": "", "signature_date": "2025-07-16T14:44:55.223178Z", "type": "recipient" } ], "sent_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null }, "tags": [ "completed", "contract", "executed" ], "linked_objects": [], "ref_number": "SERV-2025-0089", "metadata": { "document__completed_via_app": "true", "project_id": "PROJ-2025-005", "contract_value": "5000.00", "completion_method": "sequential_signing" }, "tokens": [ { "name": "Client.Name", "value": "John Doe" }, { "name": "Contract.Value", "value": "$5,000.00" }, { "name": "Contract.Number", "value": "SERV-2025-0089" }, { "name": "Completion.Date", "value": "July 16, 2025" } ], "fields": [ { "uuid": "f1a2b3c4-d5e6-7890-abcd-ef1234567890", "field_id": "client_signature", "name": "Client Signature", "title": "Client Authorization", "placeholder": "Digital Signature", "type": "signature", "value": "John Doe", "assigned_to": { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "recipient_type": "signer", "has_completed": true, "role": "Client", "roles": [ "Client" ], "type": "recipient" } }, { "uuid": "a9b8c7d6-e5f4-3210-abcd-ef0987654321", "field_id": "company_signature", "name": "Company Signature", "title": "Company Representative Authorization", "placeholder": "Digital Signature", "type": "signature", "value": "John Johnson", "assigned_to": { "id": "cXvY2PnM8QsL7WaD9kF3eH", "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "recipient_type": "signer", "has_completed": true, "role": "Company Representative", "roles": [ "Company Representative" ], "type": "recipient" } } ], "products": [], "pricing": {} } } ] } } } }, "responses": { "200": { "description": "Successful response indicating the webhook was received" } } } }, "Recipient Completed a Document": { "post": { "summary": "Recipient Completed a Document Webhook", "operationId": "handleRecipientCompletedDocument", "tags": [ "Documents" ], "description": "This webhook is triggered when a recipient has completed their assigned\ntasks for a document in PandaDoc. The webhook provides comprehensive\ndocument information along with details about which recipient completed\ntheir part and when.\n\n**Important Note**: This event indicates that a specific recipient has\ncompleted their required actions (signing, approving, etc.), but does\nnot mean the entire document workflow is complete. Other recipients may\nstill need to complete their tasks.\n\nThis event is useful for:\n- Tracking individual recipient completion in multi-recipient workflows\n- Triggering notifications for completed signatures or approvals\n- Implementing sequential approval or signing processes\n- Audit logging and compliance tracking for recipient actions\n- Monitoring document progress through approval workflows\n- Automating next steps based on specific recipient completions\n\n**Unique Fields**: The payload includes `action_by` and `action_date`\nfields that provide specific information about who completed their part\nand when the action occurred.\n\n**Note**: The webhook payload structure partially mirrors the\nDocument Details API response, providing comprehensive document\ninformation captured at the time of recipient completion.\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your webhook shared secret.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive document details captured at the time of recipient completion. The payload structure is synchronized with the Document Updated webhook and includes complete document information, recipient status, field values, pricing data, metadata, and specific recipient action details.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "recipient_completed" ], "description": "Event type identifier for recipient completion events", "example": "recipient_completed" }, "data": { "type": "object", "description": "Complete document information synchronized with Document Updated webhook structure. Contains comprehensive data about the document captured at the time of recipient completion, including recipient action details.", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "recipients", "version", "grand_total", "tags", "linked_objects" ], "properties": { "id": { "type": "string", "description": "Unique document identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "tGRhZTANFmeKKqoyvs4zzX" }, "name": { "type": "string", "description": "Document display name", "minLength": 1, "maxLength": 255, "example": "Service Agreement - Client Approval" }, "status": { "type": "string", "description": "Current document status after recipient completion", "enum": [ "document.draft", "document.sent", "document.viewed", "document.waiting_approval", "document.approved", "document.rejected", "document.waiting_pay", "document.paid", "document.completed", "document.cancelled", "document.declined" ], "example": "document.waiting_approval" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was originally created", "example": "2025-06-13T15:59:46.798660Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when document metadata was last modified", "example": "2025-07-16T11:57:46.616589Z" }, "date_completed": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was completed (null if not fully completed)", "example": null }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent to recipients", "example": "2025-06-14T08:30:15.221847Z" }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document expires (null if no expiration)", "example": "2025-08-15T11:57:35.146922Z" }, "autonumbering_sequence_name": { "type": [ "string", "null" ], "description": "Name of the autonumbering sequence used for the document (null if not used)", "example": null }, "created_by": { "type": "object", "description": "Information about the user who originally created the document", "required": [ "id", "email", "first_name", "last_name", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL (null if no avatar)", "example": null }, "membership_id": { "type": "string", "description": "User membership identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "TcZLMBcF7gvMxAZGn8SofS" } } }, "template": { "type": [ "object", "null" ], "description": "Template information (null for documents not created from template)", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Service Agreement Template" } } }, "version": { "type": "string", "description": "Document version number (increments with each modification)", "example": "2" }, "grand_total": { "type": "object", "description": "Total monetary amount for the document", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total amount value", "example": "2500.00" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "USD" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document (null if never sent)", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL", "example": null } } }, "tags": { "type": "array", "description": "Tags associated with the document for categorization and filtering", "items": { "type": "string" }, "example": [ "approval", "contract", "client-signature" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "ref_number": { "type": [ "string", "null" ], "description": "Document reference number (null if not assigned)", "example": "SERV-2025-0042" }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "products": { "type": "array", "description": "Product information included in the document", "items": { "$ref": "#/components/schemas/ProductInformation" } }, "pricing": { "$ref": "#/components/schemas/DocumentPricing" }, "action_by": { "type": "object", "description": "Information about the recipient who completed their part of the document", "required": [ "id", "email", "first_name", "last_name" ], "properties": { "id": { "type": "string", "description": "Unique recipient identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "bLvGfL77Yd2mqoHvdjhn59" }, "email": { "type": "string", "format": "email", "description": "Recipient's email address", "example": "john.doe@example.com" }, "first_name": { "type": "string", "description": "Recipient's first name", "example": "John" }, "last_name": { "type": "string", "description": "Recipient's last name", "example": "Doe" }, "recipient_type": { "type": "string", "description": "Type of recipient who completed their action", "enum": [ "signer", "cc", "approver" ], "example": "signer" }, "role": { "type": "string", "description": "Role assigned to the recipient", "example": "Client" } } }, "action_date": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the recipient completed their action", "example": "2025-07-16T14:32:18.445621Z" } } } } }, "example": [ { "event": "recipient_completed", "data": { "id": "tGRhZTANFmeKKqoyvs4zzX", "name": "Service Agreement - Client Approval", "status": "document.waiting_approval", "date_created": "2025-06-13T15:59:46.798660Z", "date_modified": "2025-07-16T11:57:46.616589Z", "date_completed": null, "date_sent": "2025-06-14T08:30:15.221847Z", "expiration_date": "2025-08-15T11:57:35.146922Z", "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null, "membership_id": "TcZLMBcF7gvMxAZGn8SofS" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Service Agreement Template" }, "version": "2", "grand_total": { "amount": "2500.00", "currency": "USD" }, "recipients": [ { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+1-555-0123", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": true, "signing_order": 1, "contact_id": "gEgusViKyvWn5UTh8yRBkT", "shared_link": "https://app.pandadoc.com/document/15d4b481384b652a298530ddc7023bfc07a67d59", "signature_date": "2025-07-16T14:32:18.445621Z", "type": "recipient" }, { "id": "cXvY2PnM8QsL7WaD9kF3eH", "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "phone": "+1-555-0456", "recipient_type": "approver", "role": "Manager", "roles": [ "Manager" ], "has_completed": false, "signing_order": 2, "contact_id": null, "shared_link": "", "signature_date": null, "type": "recipient" } ], "sent_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null }, "tags": [ "approval", "contract", "client-signature" ], "linked_objects": [], "ref_number": "SERV-2025-0042", "metadata": { "document__signed_via_app": "true", "project_id": "PROJ-2025-003", "department": "sales" }, "tokens": [ { "name": "Client.Name", "value": "John Doe" }, { "name": "Service.Total", "value": "$2,500.00" }, { "name": "Agreement.Number", "value": "SERV-2025-0042" } ], "fields": [ { "uuid": "f1a2b3c4-d5e6-7890-abcd-ef1234567890", "field_id": "client_signature", "name": "Client Signature", "title": "Client Authorization", "placeholder": "Digital Signature", "type": "signature", "value": "John Doe", "assigned_to": { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "recipient_type": "signer", "has_completed": true, "role": "Client", "roles": [ "Client" ], "type": "recipient" } } ], "products": [], "pricing": {}, "action_by": { "id": "bLvGfL77Yd2mqoHvdjhn59", "email": "john.doe@example.com", "first_name": "John", "last_name": "Doe", "recipient_type": "signer", "role": "Client" }, "action_date": "2025-07-16T14:32:18.445621Z" } } ] } } } }, "responses": { "200": { "description": "Successful response indicating the webhook was received" } } } }, "Template Created": { "post": { "description": "This webhook is triggered when a new template is created.", "tags": [ "Templates" ], "summary": "Template Created Webhook", "operationId": "handleTemplateCreated", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Details about a new template in the system.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "template_created" ] }, "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "created_by": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" } } }, "metadata": { "$ref": "#/components/schemas/TemplateMetadata" }, "folder_id": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "date_modified": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "created_by", "date_created", "date_modified", "metadata", "folder_id" ] } } }, "example": [ { "event": "template_created", "data": { "id": "8LguaBPNhU9yxvuACuDkM6", "name": "New template", "created_by": { "id": "Hzpt4yyQ3A5qHcpQdZQxpH", "email": "panda@pandadoc.com" }, "date_created": "2025-01-25T20:59:52.045928Z", "date_modified": "2025-01-25T20:59:52.045928Z", "metadata": {}, "folder_id": "AHxq4M77yrswnNNVNCJNMK" } } ] } } } }, "responses": { "200": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "Template Updated": { "post": { "operationId": "handleTemplateUpdated", "summary": "Template Updated Webhook", "tags": [ "Templates" ], "description": "This webhook is triggered when an existing template is updated.", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Details about the updated template.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "template_updated" ] }, "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "created_by": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" } } }, "metadata": { "$ref": "#/components/schemas/TemplateMetadata" }, "folder_id": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "date_modified": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "created_by", "date_created", "date_modified", "metadata", "folder_id" ] } } }, "example": [ { "event": "template_updated", "data": { "id": "8LguaBPNhU9yxvuACuDkM6", "name": "New template", "created_by": { "id": "Hzpt4yyQ3A5qHcpQdZQxpH", "email": "panda@pandadoc.com" }, "date_created": "2025-01-25T20:59:52.045928Z", "date_modified": "2025-01-25T21:01:46.615933Z", "metadata": {}, "folder_id": "AHxq4M77yrswnNNVNCJNMK" } } ] } } } }, "responses": { "200": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "Template Deleted": { "post": { "summary": "Template Deleted Webhook", "operationId": "handleTemplateDeleted", "tags": [ "Templates" ], "description": "This webhook is triggered when a template is deleted from PandaDoc.\n\nThe webhook will be sent to your configured endpoint URL when a\ntemplate is deleted from the workspace. This event is useful for:\n\n- Syncing template deletions with external systems\n- Audit logging and compliance tracking\n- Cleanup operations in dependent systems\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your shared key.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Details about the deleted template. The payload includes comprehensive template information captured at the time of deletion.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "template_deleted" ], "description": "Event type identifier" }, "data": { "type": "object", "description": "Complete template information captured at the time of deletion.\n", "required": [ "id", "name", "created_by", "date_created", "date_modified", "date_deleted", "metadata", "folder_id" ], "properties": { "id": { "type": "string", "description": "Unique template identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "vibuun3DXG8QDDLfXm27Ne" }, "name": { "type": "string", "description": "Template display name", "minLength": 1, "maxLength": 255, "example": "Marketing Agreement Template" }, "created_by": { "type": "object", "description": "Information about the user who created the template", "required": [ "id", "email" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "john.doe@company.com" } } }, "metadata": { "$ref": "#/components/schemas/TemplateMetadata" }, "folder_id": { "type": "string", "description": "When a template is deleted, the `folder_id` field in the webhook payload does not reflect the original folder where the template was stored.\nInstead, it references the Trash folder which cannot be accessed.\n", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FL8yUNg5HztqVAuH85He8V" }, "date_created": { "type": "string", "format": "date-time", "description": "Template creation timestamp", "example": "2024-01-15T10:30:00.000Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "Timestamp when template or roles were last modified.\nFor content changes, see content_date_modified.\n", "example": "2024-07-15T17:44:07.613821Z" }, "date_deleted": { "type": "string", "format": "date-time", "description": "Template deletion timestamp", "example": "2024-07-16T09:15:30.456Z" } } } } }, "example": [ { "event": "template_deleted", "data": { "id": "8LguaBPNhU9yxvuACuDkM6", "name": "New template", "created_by": { "id": "Hzpt4yyQ3A5qHcpQdZQxpH", "email": "panda@pandadoc.com" }, "date_created": "2025-01-25T20:59:52.045928Z", "date_modified": "2025-01-25T20:59:52.045928Z", "date_deleted": "2025-01-25T21:02:15.132936Z", "metadata": {}, "folder_id": "XjMK88VYcCkpoTDnGQfrYC" } } ] } } } }, "responses": { "200": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "Quote Updated": { "post": { "summary": "Quote Updated Webhook", "operationId": "handleQuoteUpdated", "tags": [ "Documents" ], "description": "This webhook is triggered when a user clicks the \"Save\" button after\nupdating a quote in the Quote Builder within PandaDoc. The webhook\ndelivers comprehensive document information reflecting the updated\nquote state and pricing details.\n\n**Important Note**: This event indicates that quote-specific updates\nhave been made to a document, such as modifying product information,\npricing, quantities, or other quote-related data through the Quote\nBuilder interface.\n\nThis event is useful for:\n- Synchronizing quote updates with external pricing and inventory systems\n- Triggering automated quote approval workflows\n- Maintaining real-time pricing and product information\n- Audit logging and compliance tracking for quote modifications\n- Implementing dynamic pricing updates and calculations\n- Notifying sales teams about quote changes and revisions\n- Integrating with CRM systems for quote tracking\n\n**Quote-Specific Data**: The payload includes comprehensive quote\ninformation including product details, pricing data, and quote-specific\nmetadata that distinguish it from regular document updates.\n\n**Note**: The webhook payload structure partially mirrors the\nDocument Details API response, providing comprehensive document\ninformation captured at the time of quote update.\n\n**Security Note**: All webhook requests include an HMAC-SHA256\nsignature for verification using your webhook shared secret.\n", "parameters": [ { "$ref": "#/components/parameters/signatureParameter" } ], "requestBody": { "description": "Comprehensive document details captured at the time of quote update. The payload structure is synchronized with the Document Updated webhook and includes complete document information, recipient status, field values, pricing data, product information, and quote-specific metadata reflecting the current state after Quote Builder modifications.", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "required": [ "event", "data" ], "properties": { "event": { "type": "string", "enum": [ "quote_updated" ], "description": "Event type identifier for quote update events", "example": "quote_updated" }, "data": { "type": "object", "description": "Complete document information synchronized with Document Updated webhook structure. Contains comprehensive data about the document captured at the time of quote update, including detailed pricing and product information.", "required": [ "id", "name", "status", "date_created", "date_modified", "created_by", "recipients", "version", "grand_total", "tags", "linked_objects", "template" ], "properties": { "id": { "type": "string", "description": "Unique document identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "tGRhZTANFmeKKqoyvs4zzX" }, "name": { "type": "string", "description": "Document display name", "example": "Sales Quote - Q2 2025" }, "status": { "type": "string", "description": "Current document status after quote update", "enum": [ "document.draft", "document.sent", "document.viewed", "document.waiting_approval", "document.approved", "document.rejected", "document.waiting_pay", "document.paid", "document.completed", "document.cancelled", "document.declined" ], "example": "document.draft" }, "date_created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the document was originally created", "example": "2025-06-13T15:59:46.798660Z" }, "date_modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the quote was last modified in Quote Builder", "example": "2025-07-16T16:45:33.892156Z" }, "date_completed": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was completed (null if not completed)", "example": null }, "date_sent": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the document was sent (null if never sent)", "example": null }, "expiration_date": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the quote expires (null if no expiration)", "example": "2025-08-15T11:57:35.146922Z" }, "autonumbering_sequence_name": { "type": [ "string", "null" ], "description": "Name of the autonumbering sequence used for the document (null if not used)", "example": null }, "created_by": { "type": "object", "description": "Information about the user who originally created the document", "required": [ "id", "email", "first_name", "last_name", "membership_id" ], "properties": { "id": { "type": "string", "description": "Unique user identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL (null if no avatar)", "example": null }, "membership_id": { "type": "string", "description": "User membership identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "TcZLMBcF7gvMxAZGn8SofS" } } }, "template": { "type": "object", "description": "Template information for the quote document", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Unique template identifier (22-character alphanumeric)", "pattern": "^[a-zA-Z0-9]{22}$", "example": "gZRVmyHiQV5riXSCMKsku2" }, "name": { "type": "string", "description": "Template display name", "example": "Sales Quote Template" } } }, "version": { "type": "string", "description": "Document version number (increments with each quote update)", "example": "4" }, "grand_total": { "type": "object", "description": "Total monetary amount for the updated quote", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Total quote amount after updates", "example": "7500.00" }, "currency": { "type": "string", "description": "Currency code (ISO 4217)", "example": "USD" } } }, "recipients": { "$ref": "#/components/schemas/DocumentRecipients" }, "sent_by": { "type": [ "object", "null" ], "description": "Information about the user who sent the document (null if never sent)", "required": [ "id", "email", "first_name", "last_name", "avatar" ], "properties": { "id": { "type": "string", "description": "Unique user identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "FA5QAu8UGA3oVDQZuPL75B" }, "email": { "type": "string", "format": "email", "description": "User email address", "example": "fname.lname@pandadoc.com" }, "first_name": { "type": "string", "description": "User's first name", "example": "FName" }, "last_name": { "type": "string", "description": "User's last name", "example": "LName" }, "avatar": { "type": [ "null", "string" ], "description": "User avatar URL", "example": null } } }, "tags": { "type": "array", "description": "Tags associated with the quote document", "items": { "type": "string" }, "example": [ "quote", "sales", "updated" ] }, "linked_objects": { "$ref": "#/components/schemas/DocumentLinkedObjects" }, "metadata": { "$ref": "#/components/schemas/DocumentMetadata" }, "tokens": { "$ref": "#/components/schemas/DocumentVariables" }, "fields": { "$ref": "#/components/schemas/DocumentFields" }, "products": { "type": "array", "description": "Updated product information from the Quote Builder", "items": { "$ref": "#/components/schemas/ProductInformation" } }, "pricing": { "$ref": "#/components/schemas/DocumentQuotePricing" } } } } }, "example": [ { "event": "quote_updated", "data": { "id": "tGRhZTANFmeKKqoyvs4zzX", "name": "Sales Quote - Q2 2025", "status": "document.draft", "date_created": "2025-06-13T15:59:46.798660Z", "date_modified": "2025-07-16T16:45:33.892156Z", "date_completed": null, "date_sent": null, "expiration_date": "2025-08-15T11:57:35.146922Z", "autonumbering_sequence_name": null, "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "fname.lname@pandadoc.com", "first_name": "FName", "last_name": "LName", "avatar": null, "membership_id": "TcZLMBcF7gvMxAZGn8SofS" }, "template": { "id": "gZRVmyHiQV5riXSCMKsku2", "name": "Sales Quote Template" }, "version": "4", "grand_total": { "amount": "7500.00", "currency": "USD" }, "recipients": [ { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+1-555-0123", "recipient_type": "signer", "role": "Client", "roles": [ "Client" ], "has_completed": false, "signing_order": 1, "contact_id": "gEgusViKyvWn5UTh8yRBkT", "shared_link": "", "signature_date": null, "type": "recipient" } ], "sent_by": null, "tags": [ "quote", "sales", "updated" ], "linked_objects": [], "metadata": { "document__updated_via_quote_builder": "true", "quote_version": "4", "last_quote_update": "2025-07-16T16:45:33.892156Z", "sales_rep": "fname.lname@pandadoc.com" }, "tokens": [ { "name": "Client.Name", "value": "John Doe" }, { "name": "Quote.Total", "value": "$7,500.00" }, { "name": "Quote.Expiry", "value": "August 15, 2025" } ], "fields": [ { "uuid": "q1a2b3c4-d5e6-7890-abcd-ef1234567890", "field_id": "client_approval", "name": "Client Approval", "title": "Please approve this quote", "placeholder": "Digital Signature", "type": "signature", "value": null, "assigned_to": { "id": "bLvGfL77Yd2mqoHvdjhn59", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "recipient_type": "signer", "has_completed": false, "role": "Client", "roles": [ "Client" ], "type": "recipient" } } ], "products": [ { "name": "Professional Services Package", "sku": "PSP-2025-001", "price": "2500.00", "qty": "2", "tax_1": "0.00", "tax_2": "0.00", "discount": "0.00", "total": "5000.00" }, { "name": "Monthly Support Plan", "sku": "MSP-2025-001", "price": "1250.00", "qty": "2", "tax_1": "0.00", "tax_2": "0.00", "discount": "250.00", "total": "2250.00" }, { "name": "Implementation Fee", "sku": "IMP-2025-001", "price": "250.00", "qty": "1", "tax_1": "0.00", "tax_2": "0.00", "discount": "0.00", "total": "250.00" } ], "pricing": { "subtotal": "7250.00", "discount": "250.00", "tax": "500.00", "total": "7500.00", "currency": "USD" } } } ] } } } }, "responses": { "200": { "description": "Webhook received successfully" } } } } }, "components": { "parameters": { "signatureParameter": { "name": "signature", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Webhooks are signed with a signature generated by taking an HMAC-SHA256 hash of the webhook post’s raw HTTP Body (UTF8 encoding).", "example": "8e5f68ee2c9f86e48a94ef592dc747af68dd6d6b64ba33bae17ee035aa983dab" } }, "schemas": { "ProductInformation": { "type": "object", "description": "Product information in the document", "properties": { "id": { "type": "string", "description": "Unique identifier for the product" }, "sku": { "type": "string", "description": "Stock Keeping Unit for the product" }, "qty": { "type": "string", "description": "Quantity of the product" }, "name": { "type": "string", "description": "Name of the product" }, "cost": { "type": "string", "description": "Cost of the product" }, "price": { "type": "string", "description": "Price of the product" }, "description": { "type": "string", "description": "Description of the product" }, "custom_fields": { "type": "object", "description": "Custom fields for the product" }, "custom_columns": { "type": "object", "description": "Custom columns for the product", "additionalProperties": true }, "discount": { "type": "object", "properties": { "value": { "type": "string", "description": "Discount value" }, "type": { "type": "string", "description": "Type of discount" } } }, "tax_first": { "type": "null", "description": "First tax applied to the product" }, "tax_second": { "type": "null", "description": "Second tax applied to the product" }, "subtotal": { "type": "string", "description": "Subtotal for the product" }, "options": { "type": "object", "properties": { "qty_editable": { "type": "boolean", "description": "Indicates if the quantity is editable" } } }, "sale_price": { "type": "string", "description": "Sale price of the product" }, "taxes": { "type": "object", "properties": { "Tax": { "type": "object", "properties": { "value": { "type": "string", "description": "Tax value" }, "type": { "type": "string", "description": "Type of tax" } } } } }, "discounts": { "type": "object", "properties": { "Discount": { "type": "object", "properties": { "value": { "type": "string", "description": "Discount value" }, "type": { "type": "string", "description": "Type of discount" } } } } }, "fees": { "type": "object", "properties": { "Fee": { "type": "object", "properties": { "value": { "type": "string", "description": "Fee value" }, "type": { "type": "string", "description": "Type of fee" } } } } }, "merged_data": { "type": "object", "properties": { "SKU": { "type": "string", "description": "Stock Keeping Unit" }, "Name": { "type": "string", "description": "Name of the product" }, "Description": { "type": "string", "description": "Description of the product" }, "Price": { "type": "string", "description": "Price of the product" }, "QTY": { "type": "string", "description": "Quantity of the product" }, "Cost": { "type": "string", "description": "Cost of the product" }, "Discount": { "type": "object", "properties": { "value": { "type": "string", "description": "Discount value" }, "type": { "type": "string", "description": "Type of discount" } } }, "Tax": { "type": "object", "properties": { "value": { "type": "string", "description": "Tax value" }, "type": { "type": "string", "description": "Type of tax" } } }, "Fee": { "type": "object", "properties": { "value": { "type": "string" }, "type": { "type": "string" } } }, "Images": { "type": "string" }, "Subtotal": { "type": "string" }, "Text": { "type": "string" } } } } }, "DocumentMetadata": { "type": "object", "description": "Custom metadata associated with the document", "additionalProperties": true, "example": { "document__created_via_public_api": "true", "document__creation_source": "public api", "my_favorite_pet": "Panda" } }, "TemplateMetadata": { "type": "object", "description": "Custom metadata associated with the template.\nCan contain any JSON-serializable data.\n", "additionalProperties": true, "example": { "department": "Legal", "category": "Agreements", "version": "2.1", "custom_field": "value" } }, "DocumentLinkedObjects": { "type": "array", "description": "External objects linked to the document", "items": { "type": "object", "required": [ "provider", "entity_type", "entity_id", "id" ], "properties": { "provider": { "type": "string", "description": "External system provider", "example": "hubspot" }, "entity_type": { "type": "string", "description": "Type of the linked entity", "example": "deal" }, "entity_id": { "type": "string", "description": "External entity identifier", "example": "18640" }, "id": { "type": "string", "description": "Unique link identifier", "example": "ea88ed1dc8094dd3a57754aa643a1954" } } } }, "DocumentVariables": { "type": "array", "description": "Document tokens (variables) with values", "items": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string", "description": "Token name", "example": "Document.GrandTotal" }, "value": { "type": "string", "description": "Token value", "example": "$29.99" } } } }, "DocumentFields": { "type": "array", "description": "Document form fields with their values and assignments", "items": { "type": "object", "required": [ "uuid", "name", "type", "field_id" ], "properties": { "uuid": { "type": "string", "description": "Unique field identifier", "example": "f03e22f3-b3a8-4783-8b26-e43880ef87bf" }, "field_id": { "type": "string", "description": "Field identifier", "example": "signature_f03e22f3-b3a8-4783-8b26-e43880ef87bf" }, "name": { "type": "string", "description": "Field name", "example": "Signature" }, "title": { "type": "string", "description": "Field title/label", "example": "Digital Signature" }, "placeholder": { "type": "string", "description": "Field placeholder text", "example": "Click to sign" }, "type": { "type": "string", "description": "Field type", "enum": [ "signature", "text", "checkbox", "date", "dropdown", "collect_file" ], "example": "signature" }, "value": { "description": "Field value (type depends on field type)", "oneOf": [ { "type": "object" }, { "type": "string" }, { "type": "boolean" }, { "type": "null" } ] }, "assigned_to": { "type": "object", "description": "Recipient assigned to this field", "properties": { "id": { "type": "string", "description": "Recipient identifier" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string" }, "recipient_type": { "type": "string" }, "has_completed": { "type": "boolean" }, "role": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string" } } } } } }, "DocumentPricing": { "type": "object", "description": "Comprehensive pricing information including tables and quotes", "properties": { "tables": { "type": "array", "description": "Pricing tables in the document", "items": { "type": "object", "required": [ "name", "id", "total", "currency" ], "properties": { "name": { "type": "string", "description": "Pricing table name", "example": "Pricing Table" }, "id": { "type": "string", "description": "Pricing table identifier", "example": "065c5cbc-a065-4843-ba17-028e63779605" }, "total": { "type": "string", "description": "Total amount for the table", "example": "11500" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "is_included_in_total": { "type": "boolean", "description": "Whether table is included in document total", "example": true }, "summary": { "type": "object", "properties": { "subtotal": { "type": "string", "example": "11500" }, "total": { "type": "string", "example": "11500" }, "discount": { "type": "string", "example": "0" }, "tax": { "type": "string", "example": "0" } } }, "items": { "type": "array", "description": "Items in the pricing table", "items": { "type": "object", "properties": { "id": { "type": "string" }, "sku": { "type": "string" }, "qty": { "type": "string" }, "name": { "type": "string" }, "price": { "type": "string" }, "description": { "type": "string" }, "subtotal": { "type": "string" } } } } } } }, "quotes": { "type": "array", "description": "Quotes in the document", "items": { "type": "object", "properties": { "id": { "type": "string" }, "currency": { "type": "string" }, "total": { "type": "string" } } } }, "total": { "type": "string", "description": "Overall pricing total" } } }, "DocumentQuotePricing": { "type": "object", "required": [ "tables", "quotes", "total" ], "properties": { "tables": { "type": "array", "items": { "type": "object", "required": [ "columns", "currency", "name", "id", "total", "is_included_in_total", "summary", "items" ], "properties": { "columns": { "type": "array", "items": { "type": "object", "required": [ "header", "name", "merge_name", "hidden" ], "properties": { "header": { "type": "string", "description": "Header of the column" }, "hidden": { "type": "boolean", "description": "Indicates if the column is hidden" }, "merge_name": { "type": "string", "description": "Name used for merging" }, "name": { "type": "string", "description": "Name of the column" } } } }, "currency": { "type": "string", "description": "Currency used in the pricing table" }, "id": { "type": "string", "description": "Unique identifier for the pricing table" }, "is_included_in_total": { "type": "boolean", "description": "Indicates if the table is included in the total" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "total", "summary", "columns" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the item" }, "name": { "type": "string", "description": "Name of the item" }, "total": { "type": "string", "description": "Total price for the item" }, "summary": { "type": "object", "required": [ "discount", "subtotal", "tax", "total" ], "properties": { "discount": { "type": "string", "description": "Total discount applied" }, "subtotal": { "type": "string", "description": "Subtotal for the item" }, "tax": { "type": "string", "description": "Total tax applied" }, "total": { "type": "string", "description": "Total amount after discounts and taxes" } } }, "columns": { "type": "array", "items": { "type": "object", "required": [ "header", "name", "merge_name", "hidden" ], "properties": { "header": { "type": "string", "description": "Header of the column" }, "hidden": { "type": "boolean", "description": "Indicates if the column is hidden" }, "merge_name": { "type": "string", "description": "Name used for merging" }, "name": { "type": "string", "description": "Name of the column" } } } } } } }, "name": { "type": "string", "description": "Name of the pricing table" }, "summary": { "type": "object", "required": [ "discount", "subtotal", "tax", "total" ], "properties": { "discount": { "type": "string", "description": "Total discount applied" }, "subtotal": { "type": "string", "description": "Subtotal for the pricing table" }, "tax": { "type": "string", "description": "Total tax applied" }, "total": { "type": "string", "description": "Total amount after discounts and taxes" } } }, "total": { "type": "string", "description": "Total amount for the pricing table" } } } }, "quotes": { "type": "array", "items": { "type": "object", "required": [ "id", "currency", "total", "summary", "sections", "merge_rules", "settings" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the quote" }, "currency": { "type": "string", "description": "Currency used for the quote" }, "total": { "type": "string", "description": "Total amount for the quote" }, "summary": { "type": "object", "required": [ "total", "subtotal", "one_time_subtotal", "recurring_subtotal", "total_qty", "discounts", "taxes", "fees", "custom_fields", "total_discount", "total_tax", "total_fee", "total_savings", "total_contract_value" ], "properties": { "total": { "type": "string", "description": "Total amount for the quote" }, "subtotal": { "type": "string", "description": "Subtotal for the quote" }, "one_time_subtotal": { "type": "string", "description": "One-time subtotal for the quote" }, "recurring_subtotal": { "type": "array", "description": "Recurring subtotal for the quote" }, "total_qty": { "type": "null", "description": "Total quantity for the quote" }, "discounts": { "type": "object", "properties": { "Discount": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of discount" }, "value": { "type": "string", "description": "Value of discount" } } } } }, "taxes": { "type": "object", "properties": { "Tax": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of tax" }, "value": { "type": "string", "description": "Value of tax" } } } } }, "fees": { "type": "object", "properties": { "Fee": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of fee" }, "value": { "type": "string", "description": "Value of fee" } } } } }, "custom_fields": { "type": "object", "description": "Custom fields for the quote" }, "total_discount": { "type": "null", "description": "Total discount applied" }, "total_tax": { "type": "null", "description": "Total tax applied" }, "total_fee": { "type": "null", "description": "Total fee applied" }, "total_savings": { "type": "null", "description": "Total savings applied" }, "total_contract_value": { "type": "null", "description": "Total contract value" } } }, "sections": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "summary", "columns" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the section" }, "name": { "type": "string", "description": "Name of the section" }, "summary": { "type": "object", "required": [ "total", "subtotal", "one_time_subtotal", "recurring_subtotal", "total_qty", "discounts", "taxes", "fees", "custom_fields", "total_section_value" ], "properties": { "total": { "type": "string", "description": "Total amount for the section" }, "subtotal": { "type": "string", "description": "Subtotal for the section" }, "one_time_subtotal": { "type": "string", "description": "One-time subtotal for the section" }, "recurring_subtotal": { "type": "array", "description": "Recurring subtotal for the section" }, "total_qty": { "type": "null", "description": "Total quantity for the section" }, "discounts": { "type": "object", "properties": { "Discount": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of discount" }, "value": { "type": "string", "description": "Value of discount" } } } } }, "taxes": { "type": "object", "properties": { "Tax": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of tax" }, "value": { "type": "string", "description": "Value of tax" } } } } }, "fees": { "type": "object", "properties": { "Fee": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of fee" }, "value": { "type": "string", "description": "Value of fee" } } } } }, "custom_fields": { "type": "object", "description": "Custom fields for the section" }, "total_section_value": { "type": "null", "description": "Total section value" } } }, "columns": { "type": "array", "items": { "type": "object", "required": [ "header", "name", "merge_name", "hidden" ], "properties": { "header": { "type": "string", "description": "Header of the column" }, "hidden": { "type": "boolean", "description": "Indicates if the column is hidden" }, "merge_name": { "type": "string", "description": "Name used for merging" }, "name": { "type": "string", "description": "Name of the column" } } } } } } }, "merge_rules": { "type": "array", "description": "Rules for merging quotes" }, "settings": { "type": "object", "required": [ "selection_type", "data_merge_enabled" ], "properties": { "selection_type": { "type": "string", "description": "Type of selection for the quote" }, "data_merge_enabled": { "type": "boolean", "description": "Indicates if data merging is enabled" } } } } } }, "total": { "type": "string", "description": "Total amount for all quotes" } } }, "DocumentRecipients": { "type": "array", "description": "List of document recipients with their completion status", "items": { "type": "object", "required": [ "id", "first_name", "last_name", "email", "recipient_type", "has_completed", "roles", "type" ], "properties": { "id": { "type": "string", "description": "Unique recipient identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "8KAZvGRL3W4u44a4fyDoeH" }, "first_name": { "type": "string", "description": "Recipient's first name", "example": "Recipient First Name" }, "last_name": { "type": "string", "description": "Recipient's last name", "example": "Recipient Last Name" }, "email": { "type": "string", "format": "email", "description": "Recipient's email address", "example": "test@pandadoc.com" }, "phone": { "type": "string", "description": "Recipient's phone number", "example": "+1-555-0123" }, "recipient_type": { "type": "string", "description": "Type of recipient", "enum": [ "signer", "cc", "approver" ], "example": "signer" }, "role": { "type": "string", "description": "Role assigned to the recipient", "example": "Client" }, "roles": { "type": "array", "description": "Array of roles assigned to the recipient", "items": { "type": "string" }, "example": [ "Client" ] }, "has_completed": { "type": "boolean", "description": "Whether the recipient has completed their required actions", "example": true }, "signing_order": { "type": [ "number", "null" ], "description": "Order in which recipient should sign (null for no specific order)" }, "contact_id": { "type": "string", "description": "Associated contact identifier", "pattern": "^[a-zA-Z0-9]{22}$", "example": "HzXnuyNraSXMhXchYjUmHJ" }, "shared_link": { "type": "string", "description": "Shared link for the recipient to access the document", "example": "https://app.pandadoc.com/document/15d4b481384b652a298530ddc7023bfc07a67d59" }, "signature_date": { "type": [ "string", "null" ], "format": "date-time", "description": "ISO 8601 timestamp when the recipient signed", "example": "2024-07-08T15:43:53.800135Z" }, "type": { "type": "string", "description": "Entity type", "example": "recipient" } } } }, "SuccessResponse": { "description": "Return a 200 status to indicate that the data was received successfully." } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true } } ```