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.

Install with one prompt

Skip the boilerplate: use the TurboDocx Agent Skill to install the SDK, configure environment variables, and generate working integration code via Claude Code, GitHub Copilot, Cursor, OpenCode, Codex CLI, or Gemini CLI:

npx skills add TurboDocx/quickstart

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
Rubyturbodocx-sdkgem install turbodocx-sdkDocs GitHub

TurboWebhooks SDKs​

Subscribe to all 7 TurboSign signature events (sent, viewed, recipient_signed, signed, completed, finalization_failed, voided) and verify inbound signatures with HMAC-SHA256. Each SDK exports the full set as constants, so you never hand-write the wire strings.

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
Rubyturbodocx-sdkgem install turbodocx-sdkDocs 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
Rubyturbodocx-sdkgem install turbodocx-sdkDocs 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
Rubyturbodocx-sdkgem install turbodocx-sdkDocs 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 for TurboSign

TurboSign accepts a senderEmail (used as the reply-to address for signature request emails). The JS/TS SDK enforces it client-side: TurboSign.configure() throws a ValidationError (generic VALIDATION_ERROR code, not an API error code) if no senderEmail is supplied in configuration or via the TURBODOCX_SENDER_EMAIL environment variable; this check runs once at configure time, not per request. Other SDKs may differ; check each SDK's README. The backend API itself does not require senderEmail for TurboSign or TurboQuote; a request or org template with no sender falls back to a generic TurboDocx no-reply address and name and is never rejected. Deliverable and TurboWebhooks do not use senderEmail at all.

TurboQuote: there is no senderEmail field on a quote request. A sender is resolved from your organization's quote template (Quote Settings) when set; if none is configured, the quote falls back to a generic TurboDocx sender rather than failing. See Prepared By & Sender Identity.

Which credentials does each product need?​

ProductAPI keyOrg IDAlso needs
TurboSignTURBODOCX_API_KEYTURBODOCX_ORG_IDTURBODOCX_SENDER_EMAIL (required by the JS/TS SDK at configure time, reply-to for signer emails; the API itself falls back to a generic sender if omitted)
DeliverableTURBODOCX_API_KEYTURBODOCX_ORG_IDNone
TurboQuoteTURBODOCX_API_KEYTURBODOCX_ORG_IDa Sender Email + Sender Name on the org quote template recommended (no per-request sender field exists; falls back to a generic TurboDocx sender if not configured)
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: Click your account avatar, then click Settings
  3. API Keys Section: Open API keys (under Developers) to generate or copy your API access token
  4. Organization ID: Copy your organization ID from the Features and integrations 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 the document-level status
getRecipients()Per-signer status, email history, and who sent it
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
getTemplateSignatureSetup()List a template's signer roles, to send it by role

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
AUTHORIZATION_ERROR403Authenticated, but lacks permission
VALIDATION_ERROR400Invalid request data or parameters
NOT_FOUND404Document or resource not found
CONFLICT409Conflicts with the resource's state
RATE_LIMIT_EXCEEDED429Too many requests, retry with backoff
NETWORK_ERRORN/ANetwork connection or timeout error

When the API returns a specific code the SDK surfaces it verbatim; otherwise, for one of the 7 named categories above, it falls back to that class's default, so code is populated for those without a null check. An error for a status code outside this table (an unexpected 5xx, for example) is not guaranteed a code.

TurboQuote / TurboSign specific codes​

These are returned by the API and passed through unchanged. They are more precise than the generic codes above; prefer them when handling a specific failure.

CodeHTTP StatusMeaning
QuoteHasNoLineItems400The quote has no line items. Add at least one product, bundle, or custom line item.
QuoteExpired400The quote is past its validUntil date. Update the date before sending.
QuoteValidUntilRequired400The quote has no validUntil date set.
QuoteNotSendable400The quote's current status does not allow sending (only drafts can be sent).
QuoteContactRequired400The quote's contact is missing a name or email.
QuoteCustomerInactive400The quote's company or contact was deleted or deactivated.
QUOTE_NOT_FOUND404No quote with that ID in this organization.

Error messages carry the actionable reason​

The API reports validation failures in several envelopes. The SDKs unwrap all of them, so error.message is the specific field-level reason, not a generic "There was an issue validating the body". Multiple field errors are joined with "; ":

"name" is not allowed to be empty; "companyId" must be a valid GUID

Audit Trail & Client Context​

Every action you take through an SDK is recorded in the TurboDocx audit trail. All six SDKs automatically attach client-context headers to every request, including TurboSign, Deliverable, TurboQuote, TurboWebhooks, and TurboPartner, so the audit trail records real environment details instead of blanks:

Recorded columnWhat the SDK sends
DeviceThe host machine / runtime the call came from
Operating systemThe OS the SDK is running on
TimezoneThe machine's IANA timezone (e.g. America/New_York)
LanguageThe machine's locale (e.g. en-US)
ApplicationTurboDocx SDK <version>

You do not configure any of this: it is collected and sent for you.

SDK / n8n calls vs. raw API calls​

The audit trail distinguishes how a request reached TurboDocx:

CallerHow it appears in the audit trail
A language SDKTurboDocx SDK <version>, with real device, OS, timezone, and language
The TurboDocx n8n nodeTurboDocx n8n Node <version>, with real device, OS, timezone, and language
A raw HTTP/API callThe name of the HTTP library that made the call, the action API Request, and N/A for the environment fields it cannot know

Raw API calls show N/A (not Unknown) for the fields no client context was supplied for. If you want fully attributed audit entries, call through an SDK or the n8n node rather than hand-rolled HTTP.


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?