TurboDocx SDKs
Official client libraries for the TurboDocx API. Build document generation and digital signature workflows in your language of choice.
Available SDKs
| Language | Package | Install Command | Links |
|---|---|---|---|
| JavaScript/TypeScript | @turbodocx/sdk | npm install @turbodocx/sdk | Docs GitHub |
| Python | turbodocx-sdk | pip install turbodocx-sdk | Docs GitHub |
| Go | github.com/turbodocx/sdk | go get github.com/turbodocx/sdk | Docs GitHub |
| Java | com.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
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
- 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
go get github.com/turbodocx/sdk
<dependency>
<groupId>com.turbodocx</groupId>
<artifactId>sdk</artifactId>
<version>1.0.0</version>
</dependency>
3. Send Your First Document for Signature
- JavaScript
- TypeScript
- Python
- 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,
});
// 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}`);
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}`);
from turbodocx import TurboSign
import os
# Configure with your API key
TurboSign.configure(
api_key=os.environ["TURBODOCX_API_KEY"],
org_id=os.environ["TURBODOCX_ORG_ID"]
)
# Send a document for signature
result = TurboSign.send_signature(
file_link="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"}
]
)
print(f"Document sent! ID: {result.documentId}")
package main
import (
"context"
"fmt"
"os"
"github.com/turbodocx/sdk"
)
func main() {
// Configure with your API key
client := sdk.NewTurboSign(
os.Getenv("TURBODOCX_API_KEY"),
os.Getenv("TURBODOCX_ORG_ID"),
)
// Send a document for signature
result, err := client.TurboSign.SendSignature(context.Background(), &sdk.SendSignatureRequest{
FileLink: "https://example.com/contract.pdf",
Recipients: []sdk.Recipient{
{Name: "John Doe", Email: "john@example.com", SigningOrder: 1},
},
Fields: []sdk.Field{
{Type: "signature", Page: 1, X: 100, Y: 500, Width: 200, Height: 50, RecipientEmail: "john@example.com"},
},
})
if err != nil {
panic(err)
}
fmt.Printf("Document sent! ID: %s\n", result.documentId)
}
import com.turbodocx.sdk.TurboSign;
import com.turbodocx.sdk.models.*;
public class Main {
public static void main(String[] args) {
// Configure with your API key
TurboSign turboSign = new TurboSign(
System.getenv("TURBODOCX_API_KEY"),
System.getenv("TURBODOCX_ORG_ID")
);
// Send a document for signature
SigningResult result = turboSign.sendSignature(
SigningRequest.builder()
.fileLink("https://example.com/contract.pdf")
.recipient(Recipient.builder()
.name("John Doe")
.email("john@example.com")
.signingOrder(1)
.build())
.field(Field.builder()
.type("signature")
.page(1).x(100).y(500).width(200).height(50)
.recipientEmail("john@example.com")
.build())
.build()
);
System.out.println("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.
| 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 |
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:
| 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
- Go
- Java
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
}
}
}
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
}
}
}
from turbodocx import TurboSign
from turbodocx.exceptions import TurboDocxError
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
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