Skip to main content

TurboDocx SDKs

Official client libraries for the TurboDocx API. Build document generation, digital signature, and quoting workflows in your language of choice.

Choose Your Product

All five modules ship in the same package for each language — pick the one that matches what you're building:

ProductUse it when you need to…
TurboSignSend documents for legally-binding e-signature; track status; download signed PDFs
DeliverableGenerate documents from templates with variable injection (DOCX / PPTX / PDF output)
TurboQuoteBuild sales quotes & proposals (CPQ): line items, a product/bundle catalog, price books
TurboWebhooksReceive real-time signature events instead of polling, and verify inbound deliveries

TurboSign, Deliverable, TurboQuote, and TurboWebhooks all use the same TURBODOCX_API_KEY + TURBODOCX_ORG_ID. See credential requirements below.

TurboSign SDKs

Send documents for legally-binding eSignatures with full audit trails.

LanguagePackageInstall CommandLinks
JavaScript/TypeScript@turbodocx/sdknpm install @turbodocx/sdkDocs GitHub
Pythonturbodocx-sdkpip install turbodocx-sdkDocs GitHub
PHPturbodocx/sdkcomposer require turbodocx/sdkDocs GitHub
Gogithub.com/TurboDocx/SDK/packages/go-sdkgo get github.com/TurboDocx/SDK/packages/go-sdkDocs GitHub
Javacom.turbodocx:turbodocx-sdkMaven CentralDocs GitHub

TurboWebhooks SDKs

Subscribe to TurboSign events (signature.document.completed, signature.document.voided) and verify inbound signatures with HMAC-SHA256.

LanguagePackageInstall CommandLinks
JavaScript / TypeScript@turbodocx/sdknpm install @turbodocx/sdkDocs GitHub
PHPturbodocx/sdkcomposer require turbodocx/sdkDocs GitHub
Pythonturbodocx-sdkpip install turbodocx-sdkDocs GitHub
Gogithub.com/TurboDocx/SDK/packages/go-sdkgo get github.com/TurboDocx/SDK/packages/go-sdkDocs GitHub
Javacom.turbodocx:turbodocx-sdkmvn / gradle (see docs)Docs GitHub

For the conceptual overview (delivery retries, payload schema, dashboard configuration), see TurboSign → Webhooks.

Deliverable SDKs

Generate documents from templates with dynamic variable injection, download source files and PDFs.

LanguagePackageInstall CommandLinks
JavaScript/TypeScript@turbodocx/sdknpm install @turbodocx/sdkDocs GitHub
Pythonturbodocx-sdkpip install turbodocx-sdkDocs GitHub
PHPturbodocx/sdkcomposer require turbodocx/sdkDocs GitHub
Gogithub.com/TurboDocx/SDK/packages/go-sdkgo get github.com/TurboDocx/SDK/packages/go-sdkDocs GitHub
Javacom.turbodocx:turbodocx-sdkMaven CentralDocs GitHub

TurboQuote SDKs

Build sales quotes and proposals programmatically: quotes and line items, a product/bundle catalog, price books, companies/contacts, and quote templates.

LanguagePackageInstall CommandLinks
JavaScript/TypeScript@turbodocx/sdknpm install @turbodocx/sdkDocs GitHub
Pythonturbodocx-sdkpip install turbodocx-sdkDocs GitHub
PHPturbodocx/sdkcomposer require turbodocx/sdkDocs GitHub
Gogithub.com/TurboDocx/SDK/packages/go-sdkgo get github.com/TurboDocx/SDK/packages/go-sdkDocs GitHub
Javacom.turbodocx:turbodocx-sdkMaven CentralDocs GitHub
Low-code or No-code?

Check out our n8n community node for workflow automation, or get TurboDocx Writer for Microsoft Word.


Quick Start

Get up and running in under 2 minutes.

1. Get Your Credentials

Before you begin, you'll need two things from your TurboDocx account:

  • API Access Token: Your authentication key
  • Organization ID: Your unique organization identifier
senderEmail required for TurboSign

TurboSign also requires a senderEmail (used as the reply-to address for signature request emails). The SDK throws a validation error if it is missing. It can be passed in the SDK configuration or supplied via the TURBODOCX_SENDER_EMAIL environment variable. Deliverable, TurboQuote, and TurboWebhooks do not require it.

Which credentials does each product need?

ProductAPI keyOrg IDAlso needs
TurboSignTURBODOCX_API_KEYTURBODOCX_ORG_IDTURBODOCX_SENDER_EMAIL (required — reply-to for signer emails)
DeliverableTURBODOCX_API_KEYTURBODOCX_ORG_ID
TurboQuoteTURBODOCX_API_KEYTURBODOCX_ORG_ID
TurboWebhooksTURBODOCX_API_KEY (administrator role — non-admin keys get 403)TURBODOCX_ORG_IDthe webhook secret returned by createWebhook, to verify inbound events

How to Get Your Credentials

  1. Login to TurboDocx: Visit https://www.turbodocx.com
  2. Navigate to Settings: Access your organization settings
  3. API Keys Section: Generate or copy your API access token
  4. Organization ID: Copy your organization ID from the same settings page

TurboSign API Key TurboSign Organization ID

Keep Your Credentials Secure
  • Store your API key and Organization ID as environment variables
  • Never commit credentials to version control
  • Rotate your API keys regularly for security

2. Install the SDK

npm install @turbodocx/sdk
# or
yarn add @turbodocx/sdk
# or
pnpm add @turbodocx/sdk

3. Send Your First Document for Signature

const { TurboSign } = require("@turbodocx/sdk");
// or with ES modules:
// import { TurboSign } from '@turbodocx/sdk';

// Configure with your API key
TurboSign.configure({
apiKey: process.env.TURBODOCX_API_KEY,
orgId: process.env.TURBODOCX_ORG_ID,
senderEmail: process.env.TURBODOCX_SENDER_EMAIL, // required for TurboSign
});

(async () => {
// Send a document for signature
const result = await TurboSign.sendSignature({
fileLink: "https://www.turbodocx.com/examples/turbodocx.pdf",
recipients: [
{ name: "John Doe", email: "john@example.com", signingOrder: 1 },
],
fields: [
{
type: "signature",
page: 1,
x: 100,
y: 500,
width: 200,
height: 50,
recipientEmail: "john@example.com",
},
],
});

console.log(`Document sent! ID: ${result.documentId}`);
})();

Core Features

All TurboDocx SDKs provide access to:

TurboSign — Digital Signatures

Send documents for legally-binding eSignatures with full audit trails.

MethodDescription
createSignatureReviewLink()Upload document for preview without sending emails
sendSignature()Upload and immediately send signature requests
getStatus()Check document and recipient signing status
download()Download the completed signed document
void()Cancel/void a signature request
resend()Resend signature request emails
getAuditTrail()Get complete audit trail with all events and timestamps

Learn more about TurboSign →

Deliverable — Document Generation

Generate documents from templates with dynamic variable injection, download source files and PDFs.

MethodDescription
generateDeliverable()Generate a document from a template with variable injection
listDeliverables()List deliverables with pagination, search, and filtering
getDeliverableDetails()Get full details of a deliverable including variables
updateDeliverableInfo()Update a deliverable's name, description, or tags
deleteDeliverable()Soft-delete a deliverable
downloadSourceFile()Download the original DOCX/PPTX source file
downloadPDF()Download the PDF version

Learn more about Deliverable SDKs →

TurboQuote — Sales Quoting & CPQ

Build quotes and proposals: line items, a product/bundle catalog, price books, companies, and contacts.

MethodDescription
createQuote()Create a draft quote for a company and contact
addLineItems()Add product or bundle line items to a quote
sendQuote()Send a quote to the customer for review
sendQuoteWithDeliverable()Merge a TurboDocx Deliverable with the quote and send for e-signature
downloadQuotePdf()Download the rendered quote PDF
createProduct() / createBundle() / createPriceBook()Manage the product catalog and pricing
createAndSend()Create, add line items, and send in a single call

Learn more about TurboQuote SDKs →

TurboWebhooks — Signature Events

Subscribe a per-org endpoint to TurboSign events and verify inbound deliveries with HMAC-SHA256. Requires an administrator API key.

MethodDescription
createWebhook()Subscribe the org's signature webhook (returns the secret once)
getWebhook()Get the webhook plus delivery stats
updateWebhook()Update URLs, events, or active state
testWebhook()Fire a synthetic delivery to all configured URLs
regenerateWebhookSecret()Rotate the HMAC secret
listWebhookDeliveries() / replayWebhookDelivery()Inspect and retry past deliveries
verifyWebhookSignature()Free function — verify the X-TurboDocx-Signature header on a received event

Learn more about TurboWebhooks SDKs →


Field Positioning

TurboSign supports two methods for placing signature fields on your documents:

MethodBest For
Coordinate-BasedPDFs with fixed layouts where you know exact pixel positions
Template-BasedDocuments where content may shift, using text anchors like {SIGNATURE}
Field Positioning Reference

For detailed information about both positioning methods, including anchor configuration, placement options, and best practices, see the Field Positioning Methods guide.

Complete Field Types Reference

For a comprehensive list of all available field types (signature, initials, text, date, checkbox, full_name, email, title, company) and their detailed usage, see the Field Types section in the API Signatures guide.


Error Handling

All SDKs provide structured error handling with detailed error codes:

const { TurboSign, TurboDocxError } = require("@turbodocx/sdk");

(async () => {
try {
const result = await TurboSign.sendSignature({
/* ... */
});
} catch (error) {
if (error instanceof TurboDocxError) {
console.error(`Error ${error.code}: ${error.message}`);
// Handle specific error codes
if (error.code === "VALIDATION_ERROR") {
// Handle validation error
}
}
}
})();

Common Error Codes

CodeHTTP StatusDescription
AUTHENTICATION_ERROR401Invalid or expired API key
VALIDATION_ERROR400Invalid request data or parameters
NOT_FOUND404Document or resource not found
RATE_LIMIT_EXCEEDED429Too many requests, retry with backoff
NETWORK_ERRORN/ANetwork connection or timeout error

Next Steps

API Signatures

Complete guide to TurboSign API integration with detailed examples.

Webhooks

Receive real-time notifications when documents are signed.

GitHub Repository

View source code, report issues, and contribute to the SDKs.


Support

Need help with the SDKs?