TurboDocx Java SDK
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.
$npx skills add TurboDocx/quickstart›/turbodocx-sdk turbosignThe 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
- Maven
- Gradle (Kotlin)
- Gradle (Groovy)
<dependency>
<groupId>com.turbodocx</groupId>
<artifactId>turbodocx-sdk</artifactId>
<version>0.9.0</version>
</dependency>
implementation("com.turbodocx:turbodocx-sdk:0.9.0")
implementation 'com.turbodocx:turbodocx-sdk:0.9.0'
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
| Method | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey(String) | String | Yes* | - | Organization API key |
accessToken(String) | String | Yes* | - | Bearer access token (alternative to apiKey) |
orgId(String) | String | Yes | - | Organization ID |
senderEmail(String) | String | Yes | - | Reply-to address for signature request emails |
senderName(String) | String | No | - | Display name used on signature request emails |
baseUrl(String) | String | No | https://api.turbodocx.com | API base URL |
connectTimeoutSeconds(int) | int | No | 60 | Connection timeout |
readTimeoutSeconds(int) | int | No | 120 | Read timeout, raise it for large document uploads |
writeTimeoutSeconds(int) | int | No | 60 | Write 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);
}
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
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