Skip to content

Migrate to SignatureAPI

Migrate from PandaDoc

Map PandaDoc documents, templates, tokens, field tags, recipients, webhooks and embedded sessions to SignatureAPI envelopes, DOCX templates and ceremonies.

This guide maps the parts of a PandaDoc API integration to SignatureAPI, with a before-and-after flow for sending a document. PandaDoc facts link to the PandaDoc developer documentation.

PandaDoc documents can also carry generated content such as pricing tables and content placeholders (create document). SignatureAPI covers the signing part: you bring a PDF or a DOCX template, and it collects signatures and returns the signed PDF with an audit log.

Concept map

PandaDocSignatureAPINotes
OAuth bearer token, or Authorization: API-Key (auth overview)API key in the X-API-Key headerA key_test_ key works in test mode, a key_live_ key in live mode. See Authentication.
DocumentEnvelope with one or more documentsOne envelope can hold several files signed together.
Create, wait for document.draft, then send (document status)One POST /v1/envelopesCreating an envelope sends it. It moves from processing to in_progress on its own. See the envelope lifecycle.
File upload (?upload) or public url (create from PDF)Document urlUpload the file first, or link a file on a supported host.
Recipients with role and signing_order (create document)Recipients with a type and a key you chooseWith routing: "sequential", recipients sign in the order of the recipients array. See Routing.
Recipient without a role (added as CC)No equivalentSigners receive the signed PDF by email by default. Send copies to other people from your app.
Field tags such as {signature:user:sig___} (field tags)Placeholders [[place_key]]A placeholder positions the place with that key. The place, not the tag, sets the type and the recipient.
Templates with template_uuid (create from template)DOCX document templatesKeep the DOCX file in your storage. No template object is stored on the API side.
tokens and prefilled fields (prefill fields)The document’s dataValues replace {{field}} merge fields in the DOCX file. Conditions and repeating table rows are supported.
pricing_tables and content_placeholdersNo equivalentBuild the table in the DOCX file with a repeating row filled from an array in data.
Embedded session (POST /documents/{id}/session) and the pandadoc-signing library (embed a session)Custom authentication and embeddable_inNo session call or library: the ceremony URL comes back on the recipient and loads in a plain iframe. See Embedding in a Web Application.
Webhooks with a signature query parameter (verification)Webhooks signed with the Standard Webhooks schemeThe signature travels in headers, not in the URL.
document_state_changed with document.completed, and document_completed_pdf_ready (events)envelope.completed, then deliverable.generatedDownload the signed PDF after deliverable.generated.
download and download-protected (download a completed document)DeliverableOne PDF with the signed documents and, for the standard type, the audit log.
Sandbox API key (sandbox key)Test modeSame base URL, a test key. Test envelopes are free, send no emails and are not legally binding.

Send a document for signature

Before. PandaDoc creates the document from an uploaded PDF (create from PDF), waits until its status is document.draft (document status), then sends it (send document). The signature field comes from a field tag in the PDF, matched to a recipient with the same role:

Terminal
curl -X POST "https://api.pandadoc.com/public/v1/documents?upload" \
  -H "Authorization: API-Key {API_KEY}" \
  -F "file=@contract.pdf;type=application/pdf" \
  -F 'data={"name":"My Document"};type=application/json'

# Poll GET /public/v1/documents/{id} until status is document.draft, then:
curl -X POST "https://api.pandadoc.com/public/v1/documents/{id}/send" \
  -H "Authorization: API-Key {API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"silent": false}'

After. One request creates and sends the envelope. The signature field is a place assigned to the recipient by key:

HTTP
POST /v1/envelopes HTTP/1.1
Host: api.signatureapi.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json

{
  "title": "Service Agreement",
  "documents": [
    {
      "url": "https://pub-9cb75390636c4a8a83a6f76da33d7f45.r2.dev/docs-samples/service-agreement.pdf",
      "places": [
        { "key": "client_signature", "type": "signature", "recipient_key": "client" }
      ],
      "fixed_positions": [
        { "place_key": "client_signature", "page": 1, "top": 172, "left": 210 }
      ]
    }
  ],
  "recipients": [
    { "type": "signer", "key": "client", "name": "Jane Doe", "email": "jane.doe@example.com" }
  ]
}

If your files use field tags, replace each tag with a placeholder such as [[client_signature]] and drop fixed_positions.

Templates and tokens

A PandaDoc template holds the content, roles and fields, and tokens fill its variables. In SignatureAPI, the DOCX file is the template: write {{candidateName}} where a value goes, then pass the values in the document’s data:

JSON
{
  "url": "https://pub-9cb75390636c4a8a83a6f76da33d7f45.r2.dev/docs-samples/offer-letter-template.docx",
  "format": "docx",
  "data": {
    "date": "November 17, 2026",
    "candidateName": "Jane Doe",
    "jobTitle": "Product Designer",
    "startDate": "January 11, 2027",
    "salary": "$95,000"
  },
  "places": [
    { "key": "candidate_signature", "type": "signature", "recipient_key": "candidate" }
  ],
  "fixed_positions": [
    { "place_key": "candidate_signature", "page": 1, "top": 300, "left": 72 }
  ]
}

Every field the template uses needs a value, or the request fails with 422. Conditions ({{if ...}}) and repeating rows are covered in Document Templates.

Webhooks

PandaDoc appends a signature query parameter, a hex HMAC-SHA256 of the body keyed with the subscription’s shared key (verification), and delivers an array of events per request (events). SignatureAPI delivers one event per request and signs it in headers: compute a base64 HMAC-SHA256 over webhook-id.webhook-timestamp.body with the endpoint’s signing secret and compare it with webhook-signature. See Webhooks.

PandaDoc eventSignatureAPI event
document_state_changed to document.sentenvelope.started
recipient_completedrecipient.completed
document_state_changed to document.completedenvelope.completed
document_completed_pdf_readydeliverable.generated
document_state_changed to document.declinedrecipient.rejected

What works differently

  • One call sends. There is no draft step to wait for between creating and sending.
  • The file is the template. Content such as pricing tables is written into the DOCX file, or filled from data with repeating rows.
  • No CC recipients. Send the signed PDF to other people from your app after deliverable.generated.

Migration checklist

  1. Create a test API key in the Dashboard and send it in X-API-Key.
  2. Export each template you send through the API as a DOCX file, and replace tokens with {{field}} merge fields and field tags with [[place_key]] placeholders.
  3. Rewrite the create-and-send calls as one envelope request.
  4. Add a webhook endpoint in the Dashboard and switch verification to Standard Webhooks.
  5. Run your flows in test mode, then switch to a live key.