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:
| Product | Use it when you need to… |
|---|---|
| TurboSign | Send documents for legally-binding e-signature; track status; download signed PDFs |
| Deliverable | Generate documents from templates with variable injection (DOCX / PPTX / PDF output) |
| TurboQuote | Build sales quotes & proposals (CPQ): line items, a product/bundle catalog, price books |
| TurboWebhooks | Receive 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.
| Language | Package | Install Command | Links |
|---|---|---|---|
| JavaScript/TypeScript | @turbodocx/sdk | npm install @turbodocx/sdk | Docs GitHub |
| Python | turbodocx-sdk | pip install turbodocx-sdk | Docs GitHub |
| PHP | turbodocx/sdk | composer require turbodocx/sdk | Docs GitHub |
| Go | github.com/TurboDocx/SDK/packages/go-sdk | go get github.com/TurboDocx/SDK/packages/go-sdk | Docs GitHub |
| Java | com.turbodocx:turbodocx-sdk | Maven Central | Docs GitHub |
TurboWebhooks SDKs
Subscribe to TurboSign events (signature.document.completed, signature.document.voided) and verify inbound signatures with HMAC-SHA256.
| Language | Package | Install Command | Links |
|---|---|---|---|
| JavaScript / TypeScript | @turbodocx/sdk | npm install @turbodocx/sdk | Docs GitHub |
| PHP | turbodocx/sdk | composer require turbodocx/sdk | Docs GitHub |
| Python | turbodocx-sdk | pip install turbodocx-sdk | Docs GitHub |
| Go | github.com/TurboDocx/SDK/packages/go-sdk | go get github.com/TurboDocx/SDK/packages/go-sdk | Docs GitHub |
| Java | com.turbodocx:turbodocx-sdk | mvn / 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.
| Language | Package | Install Command | Links |
|---|---|---|---|
| JavaScript/TypeScript | @turbodocx/sdk | npm install @turbodocx/sdk | Docs GitHub |
| Python | turbodocx-sdk | pip install turbodocx-sdk | Docs GitHub |
| PHP | turbodocx/sdk | composer require turbodocx/sdk | Docs GitHub |
| Go | github.com/TurboDocx/SDK/packages/go-sdk | go get github.com/TurboDocx/SDK/packages/go-sdk | Docs GitHub |
| Java | com.turbodocx:turbodocx-sdk | Maven Central | Docs GitHub |
TurboQuote SDKs
Build sales quotes and proposals programmatically: quotes and line items, a product/bundle catalog, price books, companies/contacts, and quote templates.
| Language | Package | Install Command | Links |
|---|---|---|---|
| JavaScript/TypeScript | @turbodocx/sdk | npm install @turbodocx/sdk | Docs GitHub |
| Python | turbodocx-sdk | pip install turbodocx-sdk | Docs GitHub |
| PHP | turbodocx/sdk | composer require turbodocx/sdk | Docs GitHub |
| Go | github.com/TurboDocx/SDK/packages/go-sdk | go get github.com/TurboDocx/SDK/packages/go-sdk | Docs GitHub |
| Java | com.turbodocx:turbodocx-sdk | Maven Central | Docs GitHub |
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
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?
| Product | API key | Org ID | Also needs |
|---|---|---|---|
| TurboSign | TURBODOCX_API_KEY | TURBODOCX_ORG_ID | TURBODOCX_SENDER_EMAIL (required — reply-to for signer emails) |
| Deliverable | TURBODOCX_API_KEY | TURBODOCX_ORG_ID | — |
| TurboQuote | TURBODOCX_API_KEY | TURBODOCX_ORG_ID | — |
| TurboWebhooks | TURBODOCX_API_KEY (administrator role — non-admin keys get 403) | TURBODOCX_ORG_ID | the webhook secret returned by createWebhook, to verify inbound events |
How to Get Your Credentials
- Login to TurboDocx: Visit https://www.turbodocx.com
- Navigate to Settings: Access your organization settings
- API Keys Section: Generate or copy your API access token
- Organization ID: Copy your organization ID from the same settings page

- 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
- JavaScript
- TypeScript
- Python
- PHP
- Go
- Java
npm install @turbodocx/sdk
# or
yarn add @turbodocx/sdk
# or
pnpm add @turbodocx/sdk
npm install @turbodocx/sdk
# or
yarn add @turbodocx/sdk
# or
pnpm add @turbodocx/sdk
# TypeScript types are included in the package
pip install turbodocx-sdk
# or
poetry add turbodocx-sdk
composer require turbodocx/sdk
go get github.com/TurboDocx/SDK/packages/go-sdk
<dependency>
<groupId>com.turbodocx</groupId>
<artifactId>turbodocx-sdk</artifactId>
<version>0.4.0</version>
</dependency>
3. Send Your First Document for Signature
- JavaScript
- TypeScript
- Python
- PHP
- Go
- Java
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}`);
})();
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
});
// 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}`);
import asyncio
import os
from turbodocx_sdk import TurboSign
# Configure with your API key
TurboSign.configure(
api_key=os.environ["TURBODOCX_API_KEY"],
org_id=os.environ["TURBODOCX_ORG_ID"],
sender_email=os.environ["TURBODOCX_SENDER_EMAIL"] # required for TurboSign
)
async def main():
# Send a document for signature
result = await TurboSign.send_signature(
file_link="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"}
]
)
print(f"Document sent! ID: {result['documentId']}")
asyncio.run(main())
<?php
use TurboDocx\TurboSign;
use TurboDocx\Config\HttpClientConfig;
use TurboDocx\Types\Recipient;
use TurboDocx\Types\Field;
use TurboDocx\Types\SignatureFieldType;
use TurboDocx\Types\Requests\SendSignatureRequest;
// Configure with your API key
TurboSign::configure(new HttpClientConfig(
apiKey: $_ENV['TURBODOCX_API_KEY'],
orgId: $_ENV['TURBODOCX_ORG_ID'],
senderEmail: $_ENV['TURBODOCX_SENDER_EMAIL']
));
// Send a document for signature
$result = TurboSign::sendSignature(
new SendSignatureRequest(
recipients: [
new Recipient('John Doe', 'john@example.com', 1)
],
fields: [
new Field(
type: SignatureFieldType::SIGNATURE,
recipientEmail: 'john@example.com',
page: 1,
x: 100,
y: 500,
width: 200,
height: 50
)
],
fileLink: 'https://www.turbodocx.com/examples/turbodocx.pdf'
)
);
echo "Document sent! ID: {$result->documentId}\n";
package main
import (
"context"
"fmt"
"log"
"os"
turbodocx "github.com/TurboDocx/SDK/packages/go-sdk"
)
func main() {
// Configure with your API key
client, err := turbodocx.NewClient(
os.Getenv("TURBODOCX_API_KEY"),
os.Getenv("TURBODOCX_ORG_ID"),
)
if err != nil {
log.Fatal(err)
}
// Send a document for signature
result, err := client.TurboSign.SendSignature(context.Background(), &turbodocx.SendSignatureRequest{
FileLink: "https://www.turbodocx.com/examples/turbodocx.pdf",
SenderEmail: "contracts@acme.com", // required for TurboSign
Recipients: []turbodocx.Recipient{
{Name: "John Doe", Email: "john@example.com", SigningOrder: 1},
},
Fields: []turbodocx.Field{
{Type: "signature", Page: 1, X: 100, Y: 500, Width: 200, Height: 50, RecipientEmail: "john@example.com"},
},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Document sent! ID: %s\n", result.DocumentID)
}
import com.turbodocx.TurboDocxClient;
import com.turbodocx.models.*;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws Exception {
// Configure with your API key
TurboDocxClient client = new TurboDocxClient.Builder()
.apiKey(System.getenv("TURBODOCX_API_KEY"))
.orgId(System.getenv("TURBODOCX_ORG_ID"))
.senderEmail(System.getenv("TURBODOCX_SENDER_EMAIL")) // required for TurboSign
.build();
// Send a document for signature
SendSignatureResponse result = client.turboSign().sendSignature(
new SendSignatureRequest.Builder()
.fileLink("https://www.turbodocx.com/examples/turbodocx.pdf")
.recipients(Arrays.asList(
new Recipient("John Doe", "john@example.com", 1)
))
.fields(Arrays.asList(
new Field("signature", 1, 100, 500, 200, 50, "john@example.com")
))
.build()
);
System.out.println("Document sent! ID: " + result.getDocumentId());
}
}
Core Features
All TurboDocx SDKs provide access to:
TurboSign — Digital Signatures
Send documents for legally-binding eSignatures with full audit trails.
| Method | Description |
|---|---|
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 |
Deliverable — Document Generation
Generate documents from templates with dynamic variable injection, download source files and PDFs.
| Method | Description |
|---|---|
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.
| Method | Description |
|---|---|
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.
| Method | Description |
|---|---|
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:
| Method | Best For |
|---|---|
| Coordinate-Based | PDFs with fixed layouts where you know exact pixel positions |
| Template-Based | Documents where content may shift, using text anchors like {SIGNATURE} |
For detailed information about both positioning methods, including anchor configuration, placement options, and best practices, see the Field Positioning Methods guide.
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:
- JavaScript
- TypeScript
- Python
- PHP
- Go
- Java
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
}
}
}
})();
import { TurboSign, TurboDocxError } from "@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
}
}
}
import asyncio
from turbodocx_sdk import TurboSign, TurboDocxError
async def main():
try:
result = await TurboSign.send_signature(...)
except TurboDocxError as e:
print(f"Error {e.code}: {e.message}")
if e.code == "VALIDATION_ERROR":
# Handle validation error
pass
asyncio.run(main())
<?php
use TurboDocx\TurboSign;
use TurboDocx\Exceptions\TurboDocxException;
use TurboDocx\Exceptions\ValidationException;
try {
$result = TurboSign::sendSignature(/* ... */);
} catch (ValidationException $e) {
echo "Validation error: {$e->getMessage()}\n";
// Handle validation error
} catch (TurboDocxException $e) {
echo "Error {$e->getCode()}: {$e->getMessage()}\n";
echo "Status code: {$e->statusCode}\n";
}
result, err := client.TurboSign.SendSignature(ctx, request)
if err != nil {
var turboErr *sdk.TurboDocxError
if errors.As(err, &turboErr) {
fmt.Printf("Error %s: %s\n", turboErr.Code, turboErr.Message)
if turboErr.Code == "VALIDATION_ERROR" {
// Handle validation error
}
}
}
import com.turbodocx.sdk.TurboSign;
import com.turbodocx.sdk.TurboDocxException;
import com.turbodocx.sdk.TurboDocxException.*;
try {
SigningResult result = turboSign.sendSignature(/* ... */);
} catch (AuthenticationException e) {
System.err.println("Invalid API key: " + e.getMessage());
} catch (ValidationException e) {
System.err.println("Validation error: " + e.getMessage());
System.err.println("Error code: " + e.getCode());
} catch (RateLimitException e) {
System.err.println("Rate limited: " + e.getMessage());
} catch (TurboDocxException e) {
System.err.println("Error " + e.getCode() + ": " + e.getMessage());
System.err.println("Status code: " + e.getStatusCode());
}
Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
AUTHENTICATION_ERROR | 401 | Invalid or expired API key |
VALIDATION_ERROR | 400 | Invalid request data or parameters |
NOT_FOUND | 404 | Document or resource not found |
RATE_LIMIT_EXCEEDED | 429 | Too many requests, retry with backoff |
NETWORK_ERROR | N/A | Network connection or timeout error |
Next Steps
Support
Need help with the SDKs?
- Discord Community: Join our Discord for real-time support
- GitHub Issues: Report bugs or request features
- Documentation: Browse the language-specific guides in the sidebar