DEV Community

Cover image for Integrate eSignatures into your Java apps with the BoldSign Java SDK
Dhinesh Sekar for BoldSign

Posted on • Originally published at boldsign.com

Integrate eSignatures into your Java apps with the BoldSign Java SDK

The BoldSign API already powers eSignature workflows for thousands of businesses. Now, with the BoldSign Java SDK, Java developers can easily bring eSignature capabilities into their applications with clean methods, strong typing, and minimal setup.

Why a Java SDK?

Java remains the backbone of mission-critical systems, enterprise applications, and SaaS platforms across the globe. Many developers asked for a library that feels native to Java, and we delivered. The BoldSign Java SDK is designed to reduce complexity and accelerate development.

Instead of writing request code manually, the SDK offers:

  • Simple method calls that map directly to BoldSign features.
  • Strongly typed models and classes to catch errors early.
  • Minimal boilerplate so you can focus on your core logic.

Key capabilities of the BoldSign Java SDK

The SDK brings the full power of BoldSign within your Java projects and allows you to:

  • Send documents for signature: Upload contracts, agreements, or NDAs, define recipients, and request signatures—all in just a few lines of code.
  • Manage templates: Reuse document templates for recurring workflows or combine multiple templates when needed.
  • Track document status: Know instantly whether a signer has opened, signed, or declined a request.
  • Set recipients and signing order: Add one or multiple signers, assign roles, and define signing order programmatically.
  • Access audit trails and completed files: Download signed PDFs and retrieve detailed audit logs for compliance and recordkeeping.

Quick start example

Here’s a simple example showing how to send a document for signature using the SDK:


    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("Signer");
            signer.setEmailAddress("hankwhite@cubeflakes.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());
        }
    }
Enter fullscreen mode Exit fullscreen mode

With just a few lines of code, you’re sending documents for signature—fully integrated with BoldSign.

Benefits for your development team

Integrating BoldSign with your Java application isn’t just fast—it’s smart. Here’s how your team benefits:

  • Faster development: Add eSignature functionality in minutes with minimal setup.
  • Reduced errors: Strong typing and clear models help ensure you’re using methods correctly.
  • Flexible use: Whether you’re building enterprise apps, microservices, or lightweight utilities, the SDK fits right in.
  • Safe testing environment: Use our free sandbox before pushing live.

Getting started with the BoldSign Java SDK

Follow these simple steps to integrate BoldSign into your Java application.

Step 1: Install the SDK

Maven setup

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


    <dependency>
      <groupId>com.boldsign</groupId>
      <artifactId>boldsign-java</artifactId>
      <version>1.0.3</version>
      <scope>compile</scope>
    </dependency>
Enter fullscreen mode Exit fullscreen mode

Find the latest version on Maven Central. To install locally, execute:

    mvn clean install
Enter fullscreen mode Exit fullscreen mode

To deploy to a remote Maven repository, execute:


    mvn clean deploy
Enter fullscreen mode Exit fullscreen mode

(Make sure your pom.xml or settings.xml is configured— see the OSSRH guide.)

Gradle setup

Add this to your build.gradle:


    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"
      }
Enter fullscreen mode Exit fullscreen mode

Build and run on Windows:


    .\gradlew.bat clean build
    .\gradlew.bat run
Enter fullscreen mode Exit fullscreen mode

Step 2: Generate your API key

To authenticate API requests:

1. Sign up for a free BoldSign sandbox account.
2. Generate your API key from the BoldSign dashboard. Refer to the API key generation guide for assistance.

Step 3: Start building

Explore the Java SDK documentation for more examples and setup guides.

Conclusion

The BoldSign Java SDK makes it straightforward to bring secure, legally binding eSignatures into your Java applications. Whether you’re building enterprise systems, SaaS platforms, or custom tools, the SDK helps you deliver a smooth signing experience quickly.

Sign up for a free sandbox account to explore these features. For support, contact our team via the support portal or schedule a personalized demo. You can also visit the Java SDK documentation for detailed setup instructions, code examples, and API references.

Related blogs

Note: This blog was originally published at boldsign.com

Top comments (0)