Datawise Logo

Docs

API Documentation

Version 1.0.0

DataWise Document Exchange

API v1.0.0

Code Examples

Ready-to-use Examples

Copy and adapt these examples for your specific use case. Remember to replace YOUR_API_KEY with your actual API key.

Simple Document Generation

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@template.docx" \
  -F "firstName=John" \
  -F "lastName=Doe" \
  -F "companyName=Acme Corporation" \
  -F "invoiceNumber=INV-2024-001" \
  -F "date=January 15, 2024"

With Dynamic Images

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@template.docx" \
  -F "companyName=Tech Innovations Inc" \
  -F "%logo_200x100=@company-logo.png" \
  -F "%signature_150x50=@ceo-signature.png" \
  -F "%productImage_300x200=https://example.com/product.jpg"

With Loop Data (Tables/Lists)

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@invoice-template.docx" \
  -F "invoiceNumber=INV-2024-001" \
  -F '#items=[{"description":"Website Development","quantity":1,"rate":5000,"amount":5000},{"description":"SEO Optimization","quantity":3,"rate":500,"amount":1500},{"description":"Maintenance (Monthly)","quantity":12,"rate":200,"amount":2400}]' \
  -F "totalAmount=8900"

E-Signature Integration

E-Signature Setup

Before using the E-signature feature, you need to set up your sender identity in the dashboard. This is a self-service process that takes just a few minutes.

Setup Steps:

  1. Log in to your account at go.datawise.app
  2. Navigate to Sender Identities from the main navigation menu
  3. Click Add Sender Identity and provide:
    • Name: Display name for your sender identity
    • Email: The email address to use for sending documents (can be your account email)
    • Notification Settings: Choose which notifications you want to receive (optional)
  4. Verify the sender email: A verification email will be sent to the sender email address you specified in step 3. The person with access to that email must click the verification link to approve the sender identity.
  5. Start using E-signatures: Once the sender email is verified, the sender identity status will change to "Approved" and you can start sending documents for signature using that sender email.

Important: The verification email goes to the sender email address (not your account email, unless they're the same). There may be a wait time depending on how quickly that person responds. Make sure they check their inbox and spam folder.

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@contract-template.docx" \
  -F "clientName=John Doe" \
  -F "contractDate=January 15, 2025" \
  -F 'ddxE_signers=[{"signerRole":"client","signerEmail":"john@example.com","signerName":"John Doe","required":["signature","date"]},{"signerRole":"company","signerEmail":"legal@company.com","signerName":"Jane Smith","required":["signature","initials","date"]}]' \
  -F "ddxE_senderEmail=noreply@company.com" \
  -F "ddxE_emailMessage=Please review and sign the attached service agreement." \
  -F "ddxE_webhookUrl=https://yourapp.com/webhooks/signature-status"

Testing with Preview Mode

Test your e-signature integration without sending actual emails by using preview mode:

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@contract-template.docx" \
  -F "clientName=Test User" \
  -F 'ddxE_signers=[{"signerRole":"client","signerEmail":"test@example.com","signerName":"Test User","required":["signature"]}]' \
  -F "ddxE_senderEmail=sender@example.com" \
  -F "ddxE_signPreview=true"

With ddxE_signPreview=true, the API will process the document and return a preview URL without actually sending signature request emails.

PDF Merging

Merge multiple PDFs with your generated document:

curl -X POST https://api.datawise.app/api/datawise_document_exchange \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "ddx_outputFormat=pdf" \
  -F "ddx_template=@report-template.docx" \
  -F "reportTitle=Annual Report 2025" \
  -F "reportDate=January 15, 2025" \
  -F "&cover=@cover-page.pdf" \
  -F "&appendix=@appendix.pdf" \
  -F '&structure=["cover", "content", "appendix"]'

The &structure array defines the order of PDFs, where "content" represents the generated document.

Ready to Build?

These examples cover the most common use cases. For more complex scenarios, combine different features and refer to the parameter documentation for all available options.

© Copyright 2026, Datawise Document Exchange.