Skip to main content

TurboDocx Java SDK

Agent Skill

Let an agent scaffold this for you

Install the TurboDocx Quickstart Skill and let Claude Code, Cursor, Copilot, Codex, or any agent that speaks the Agent Skills standard install the SDK, wire it into your app, and write a working TurboSign integration end-to-end.

bash — turbodocx
$npx skills add TurboDocx/quickstart
# then, inside your agent:›/turbodocx-sdk turbosign

The official TurboDocx SDK for Java applications. Build document generation and digital signature workflows with the Builder pattern, comprehensive error handling, and type-safe APIs. Available on Maven Central as com.turbodocx:turbodocx-sdk.

Installation​

<dependency>
<groupId>com.turbodocx</groupId>
<artifactId>turbodocx-sdk</artifactId>
<version>0.9.0</version>
</dependency>

Requirements​

  • Java 11+
  • OkHttp 4.x (included)
  • Gson 2.x (included)

Configuration​

import com.turbodocx.TurboDocxClient;

public class Main {
public static void main(String[] args) {
// Create client with Builder pattern
TurboDocxClient client = new TurboDocxClient.Builder()
.apiKey(System.getenv("TURBODOCX_API_KEY"))
.orgId(System.getenv("TURBODOCX_ORG_ID"))
.senderEmail(System.getenv("TURBODOCX_SENDER_EMAIL"))
.build();

// Or with custom base URL
TurboDocxClient customClient = new TurboDocxClient.Builder()
.apiKey(System.getenv("TURBODOCX_API_KEY"))
.orgId(System.getenv("TURBODOCX_ORG_ID"))
.senderEmail(System.getenv("TURBODOCX_SENDER_EMAIL"))
.baseUrl("https://api.turbodocx.com")
.build();
}
}

Builder Options​

MethodTypeRequiredDefaultDescription
apiKey(String)StringYes*-Organization API key
accessToken(String)StringYes*-Bearer access token (alternative to apiKey)
orgId(String)StringYes-Organization ID
senderEmail(String)StringYes-Reply-to address for signature request emails
senderName(String)StringNo-Display name used on signature request emails
baseUrl(String)StringNohttps://api.turbodocx.comAPI base URL
connectTimeoutSeconds(int)intNo60Connection timeout
readTimeoutSeconds(int)intNo120Read timeout, raise it for large document uploads
writeTimeoutSeconds(int)intNo60Write timeout, raise it for large document uploads

*Provide either apiKey or accessToken.

// Tune the timeouts for large documents
TurboDocxClient client = new TurboDocxClient.Builder()
.apiKey(System.getenv("TURBODOCX_API_KEY"))
.orgId(System.getenv("TURBODOCX_ORG_ID"))
.senderEmail(System.getenv("TURBODOCX_SENDER_EMAIL"))
.connectTimeoutSeconds(30)
.readTimeoutSeconds(300)
.writeTimeoutSeconds(300)
.build();

Closing the Client​

TurboDocxClient implements AutoCloseable. Calling close() shuts down the underlying OkHttp dispatcher and connection pool, so long-running JVM services should close clients they no longer need. Use try-with-resources for short-lived clients:

try (TurboDocxClient client = new TurboDocxClient.Builder()
.apiKey(System.getenv("TURBODOCX_API_KEY"))
.orgId(System.getenv("TURBODOCX_ORG_ID"))
.senderEmail(System.getenv("TURBODOCX_SENDER_EMAIL"))
.build()) {

SendSignatureResponse result = client.turboSign().sendSignature(request);
}
Reuse a single client

Creating a client per request leaks OkHttp threads until they are closed. Prefer one long-lived client for the life of your application and call client.close() during shutdown.

Environment Variables​

export TURBODOCX_API_KEY=your_api_key_here
export TURBODOCX_ORG_ID=your_org_id_here
export TURBODOCX_SENDER_EMAIL=sender@yourcompany.com
API Credentials Required

Three parameters are required for TurboSign operations: apiKey (or accessToken), orgId, and senderEmail. The senderEmail is used as the reply-to address for signature request emails. To get your credentials, follow the Get Your Credentials steps from the SDKs main page.


Product guides​

Each product guide opens on the Java tab:

  • TurboSign: send documents for signature, track status, download signed PDFs and audit trails
  • Deliverable: generate documents from templates
  • TurboWebhooks: receive real-time signature events
  • TurboQuote: create, send and download quotes

Resources​