Skip to content
  1. Blog
  2. API

Integrate eSignatures into Your Java Apps with the BoldSign Java SDK

TL;DR: The BoldSign software development kit (SDK) for Java lets your Java app send documents for signature with a few method calls. You add it with Maven or Gradle, set your API key and call sendDocument. Our Java SDK page shows what it covers.

Say your team runs a Java app for a staffing agency. Each new contractor must sign an agreement, and you want the app to send it and file the signed copy.

You could build every web request to an eSignature service by hand. The BoldSign Java SDK does that work for you, so your code stays short and typed.

What is the BoldSign Java SDK?

The BoldSign Java SDK is a free code library that wraps our eSignature API in Java classes. You call a method, and the SDK builds and sends the request.

Think of a car’s gear stick. You move it to a letter and never see the parts that shift underneath. The SDK works the same way for each API call.

Why use a Java SDK instead of raw API calls?

An SDK saves you from writing and maintaining request code yourself. Your editor also catches many mistakes before the code runs.

  • Each method maps to one BoldSign action, such as sending a document.
  • Typed models and classes flag wrong fields when you compile.
  • Less setup code leaves more time for your own logic.

What can the BoldSign Java SDK do?

The SDK groups its methods into classes, one for each part of the API. The main ones for signing are DocumentApi and TemplateApi.

  • Send a contract or agreement for signature with sendDocument.
  • Send a saved document template with sendUsingTemplate.
  • Check whether a document is signed, declined or still waiting with getProperties.
  • Download the signed PDF with downloadDocument and the audit trail with downloadAuditLog.
  • Show the signing page inside your app with getEmbeddedSignLink.

You can also add several signers, give each one a role and set the order they sign in.

How do you send a document for signature in Java?

Build a signature field, a signer and a file list, then call sendDocument. The response holds the new document’s ID.

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.boldsign.ApiClient;
import com.boldsign.ApiException;
import com.boldsign.Configuration;
import com.boldsign.api.DocumentApi;
import com.boldsign.model.*;
import com.boldsign.model.FormField.FieldTypeEnum;

public class Example {
    public static void main(String[] args) throws ApiException {
        ApiClient apiClient = Configuration.getDefaultApiClient();
        apiClient.setApiKey("YOUR_API_KEY");
        DocumentApi documentApi = new DocumentApi(apiClient);

        List<File> files = new ArrayList<File>();
        File file = new File("examples/documents/agreement.pdf");
        files.add(file);

        List<FormField> formFields = new ArrayList<FormField>();

        FormField signatureField = new FormField();
        signatureField.setFieldType(FieldTypeEnum.SIGNATURE);
        signatureField.setPageNumber(1);
        Rectangle rectangle = new Rectangle().x(100f).y(100f).width(100f).height(50f);
        signatureField.setBounds(rectangle);
        formFields.add(signatureField);

        List<DocumentSigner> signers = new ArrayList<DocumentSigner>();

        DocumentSigner signer = new DocumentSigner();
        signer.setName("Alex");
        signer.setEmailAddress("alex@example.com");
        signer.setFormFields(formFields);
        signers.add(signer);

        SendForSign sendForSign = new SendForSign();
        sendForSign.setTitle("Agreement");
        sendForSign.setFiles(files);
        sendForSign.setSigners(signers);

        DocumentCreated document = documentApi.sendDocument(sendForSign);
        System.out.println(document.getDocumentId());
    }
}

The bounds place the signature box on page 1 of the file. Alex then gets an email with a link to sign.

How do you install the BoldSign Java SDK?

Add the SDK to your build file with Maven or Gradle. The SDK needs Java 1.8 or later.

How do you set it up with Maven?

Add this dependency to your project’s pom.xml file.

<dependency>
  <groupId>com.boldsign</groupId>
  <artifactId>boldsign-java</artifactId>
  <version>1.0.3</version>
  <scope>compile</scope>
</dependency>

Find the latest version on Maven Central. Run this command to install the library to your local Maven repository.

mvn clean install

Run this command to deploy it to a remote Maven repository.

mvn clean deploy

Set up your pom.xml or settings.xml file first. The Open Source Software Repository Hosting (OSSRH) guide explains how.

How do you set it up with Gradle?

Add this to your build.gradle file.

repositories {
    mavenCentral()     // Needed if the 'boldsign-java' jar has been published to maven central.
    mavenLocal()       // Needed if the 'boldsign-java' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.boldsign:boldsign-java:1.0.3"
  }

On Windows, build and run the project with these commands.

.\gradlew.bat clean build
.\gradlew.bat run

How do you get your API key?

Create a free sandbox account, then generate a key in the BoldSign web app. You pass that key to the API client in your code.

  1. Sign up for a free API sandbox account.
  2. Generate your API key in the BoldSign web app. Our API key generation guide shows each step.
  3. Keep the key in an environment variable, not in code you share.

US accounts need no other setting. For Europe, Canada or Australia, call setBasePath with your region’s address, such as https://api-eu.boldsign.com.

Where can you find more Java SDK examples?

Our Java SDK documentation has setup guides and more examples. The source code is public in our boldsign-java-sdk repository on GitHub.

The repository lists every class and method with an example. Check it when you need an option that this guide does not show.

Which plan do you need, and what does the BoldSign API cost?

Every BoldSign plan, including the free Essential plan, gives you sandbox API access for testing. Live API calls, embedded signing and webhooks need the Enterprise API plan.

The Enterprise API plan starts at $30 a month with 40 envelopes, billed yearly. Each extra envelope costs $0.75. Prices are in USD, as of November 2026, and the pricing page lists every plan.

What can you build next with the Java SDK?

The same few methods work for contractor agreements, offer letters, consent forms and other documents. Start in the sandbox, then move to live calls when your flow works.

Frequently asked questions

Is there a Java SDK for electronic signatures?

Yes. The BoldSign Java SDK is a free library that wraps our eSignature API in Java classes. You call methods such as sendDocument instead of writing web requests by hand.

Which Java version does the BoldSign SDK need?

The SDK needs Java 1.8 or later. To build it from source, you also need Maven 3.8.3 or later, or Gradle 7.2 or later.

How do I add the BoldSign SDK to a Maven project?

Add the com.boldsign group and the boldsign-java artifact as a dependency in your pom.xml file. Maven Central lists the latest version number.

Can I use the BoldSign Java SDK with Gradle?

Yes. Add mavenCentral to your repositories and the boldsign-java package to your dependencies in build.gradle, then build your project as usual.

Where do I get an API key for the Java SDK?

Create a free API sandbox account, then generate a key in the BoldSign web app. Pass the key to the API client with setApiKey before you call any method.

Are documents signed through the BoldSign Java SDK legally binding?

Yes, when the signing meets the eSignature rules for your country and document type. Each document gets an audit trail that records who signed and when.

Can I test the BoldSign Java SDK for free?

Yes. Every BoldSign plan, including the free one, includes sandbox API access. Sandbox documents are for testing and carry no legal weight.

How much does the BoldSign API cost for live documents?

Live API calls need the Enterprise API plan, from $30 a month with 40 envelopes, billed yearly. Each extra envelope costs $0.75, as of November 2026.

Evans Omondi Otieno

Evans Omondi Otieno is a customer support representative and writer at BoldSign, specializing in creating clear, insightful content to help users navigate eSignature solutions. As a blog author, Evans writes well-researched articles that simplify technical concepts, helping businesses and professionals understand how to use BoldSign effectively. With expertise in technical support and content creation, he ensures users have a seamless experience and gain valuable knowledge from his articles.

More posts by Evans Omondi Otieno
Get started

Sign up for your free trial today!

Start free trial
  • 30-day free trial
  • No credit card required