In the world of digital business, signatures are more than just a formality — they’re a critical part of trust, compliance, and workflow automation. Whether you’re closing deals, onboarding clients, or approving internal documents, the ability to collect legally binding electronic signatures quickly and securely can make or break your process.
That’s where DocStudio comes in.
DocStudio is a modern, enterprise-grade EDI (Electronic Data Interchange) platform that goes far beyond document storage and exchange. It offers a clean, intuitive UI and a rich, flexible, developer-friendly API that allows you to integrate complex document workflows — including electronic signature collection — directly into your application or service.
In this tutorial, we’ll walk through how to use the DocStudio API to collect a signature on a PDF document. Whether you’re building an internal tool or a customer-facing app, this guide will show you how to:
By the end of this guide, you’ll have a working signature flow fully integrated into your system — no manual steps, no external signing platforms, no friction.
Let’s dive in.
First we need to create an account on DocStudio. You can do this by visiting the DocStudio registration page and following the instructions.
Once you have an account, you’ll need to get an application token. To do this you need to log in to the DocStudio, proceed to Application token tab at Profile page and generate a new token. Keep it in a safe place, and never commit it to public repositories or share it with anyone. This token gives you full access to the DocStudio API and should be treated as a secret.
For this demo I’ve prepared simple waiver form in PDF format. You can download it here.
Create new Java project or use existing one and add DocStudio API client dependency.
To use it in your Maven build add:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.jecksolovyev</groupId>
<artifactId>com.docstudio.api.client</artifactId>
<version>R127.4</version>
</dependency>
</dependencies>
To use it in with Gradle add:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.jecksolovyev:com.docstudio.api.client:R127.4'
}
ApiClient
class and pass your application token to it:import com.docstudio.client.ApiClient;
...
private ApiClient getApiClient(String token) {
ApiClient client = new ApiClient();
client.setBearerToken(token);
return client;
}
...
ApiClient apiClient = getApiClient("my_application_token");
MailboxControllerApi mailboxControllerApi = new MailboxControllerApi(apiClient);
UUID mailboxId = mailboxControllerApi.getAllForUser().getFirst().getMailboxUuid();
EnvelopeControllerApi envelopeControllerApi = new EnvelopeControllerApi(apiClient);
UUID sentEnvelopeId = envelopeControllerApi.quickSendExternalDocuments(mailboxUuid, files, quickSendRequest).getUuid();
Now the envelope is sent to the email you have put in the recipients list. You can add as many recipients as needed — signers, viewers, or CC roles — depending on your use case. Please also check our Service documentation and Swagger for comprehensive documentation.
The signer will receive an email with a link to the document and will be able to sign it or reject.
if (envelopeControllerApi.getEnvelopeByUuid(sentEnvelopeId, mailboxId).getEnvelope().getStatus().equals(EnvGetDTO.StatusEnum.COMPLETED)) { File envelopeZip = envelopeControllerApi.getEnvelopeZip(sentEnvelopeId, mailboxUuid, null, null, null); //unzip archive and get everything you need and even more}
As you’ve seen, integrating electronic signature functionality into your application using the DocStudio API is not only possible — it’s straightforward, powerful, and highly customizable. From uploading a PDF, sending signature requests, and finally downloading the signed document, DocStudio gives you full control over the entire process through a clean and developer-friendly API.
Whether you’re automating legal agreements, HR documents, waivers, or any other signature-driven workflow, DocStudio lets you embed that functionality directly into your product without relying on external signing tools or slow, manual workflows.
This tutorial covered the basics of a one-time signature flow, but DocStudio supports much more: reusable templates, embedded signing, complex role-based workflows, webhooks, and detailed audit trails — all accessible via the same consistent API.
Now that you’ve seen what’s possible, imagine how much of your document pipeline you can automate.
Happy coding!