Skip to main content

TurboDocx SDKs

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

Available SDKs

LanguagePackageInstall CommandLinks
JavaScript/TypeScript@turbodocx/sdknpm install @turbodocx/sdkDocs GitHub
Pythonturbodocx-sdkpip install turbodocx-sdkDocs GitHub
Gogithub.com/turbodocx/sdkgo get github.com/turbodocx/sdkDocs GitHub
Javacom.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

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,
});

// Send a document for signature
const result = await TurboSign.sendSignature({
fileLink: "https://example.com/contract.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 →

TurboDocx — Document Generation (Coming Soon)

Generate documents from templates with dynamic data.


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");

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?