TL;DR: The BoldSign Node.js software development kit (SDK) is an npm package that lets your Node.js app send documents for signature with a few method calls. You install it with
npm install boldsign, add your API key, and callsendDocument. Our Node.js SDK page shows what it covers.
Say you run a Node.js app where customers sign a service agreement before they start. Without a library, you would build each web request by hand, attach the PDF as form data and parse every reply.
The SDK does that plumbing for you. This guide explains what it includes, how to set it up, and how a first signature request looks in code.
What is an eSignature SDK?
An eSignature SDK is a code library that wraps an e-signature API in ready-made methods. You call sendDocument() instead of writing the web request yourself.
Think of a television remote. You press one button to change the channel, and the remote sends the right signal for you. The SDK is the remote, and the BoldSign API is the television.
We also offer SDKs for Python, Java and other languages. See the eSignature SDK overview for the full set.
What can you do with the BoldSign Node.js SDK?
You can run the whole signing flow from your server code. The methods below come from the SDK’s public method list on GitHub.
- Send a PDF for signature with signers and fields, using
sendDocument. - Send a saved template to new signers, using
sendUsingTemplate. - Get a signing link to show inside your app, using
getEmbeddedSignLink. - Check a document’s status and signers, using
getProperties. - Download the signed PDF and its audit trail, using
downloadDocumentanddownloadAuditLog.
The package is written in TypeScript and ships its own type definitions. Your editor can suggest method names and catch wrong field types as you code.
How do you set up the SDK?
Setup takes three steps, and you can test everything in a free sandbox first.
- Install the SDK.
npm install boldsign
- Sign up for a free API sandbox account and create an API key from the dashboard.
- Pass the key to each API class with
setApiKey, or pass an OAuth 2.0 access token withsetDefaultAuthentication.
The SDK readme lists Node 12 or higher. The Node.js SDK documentation has the full setup guide.
Which base address does your account need?
US accounts use the default address, https://api.boldsign.com, so you set nothing extra. Other regions pass their own address when they create an API class.
- Europe:
https://api-eu.boldsign.com - Canada:
https://api-ca.boldsign.com - Australia:
https://api-au.boldsign.com
How does a Node.js digital signature request work?
You describe the document, the signer and the signature field, then send it in one call. The reply holds a document ID that you use for every later step.
The sample below follows the example in the SDK readme. It places one signature box on page 1 for a single signer.
import { DocumentApi, DocumentSigner, FormField, Rectangle, SendForSign } from 'boldsign';
import * as fs from 'fs';
const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey('YOUR_API_KEY_HERE');
const bounds = new Rectangle();
bounds.x = 100;
bounds.y = 50;
bounds.width = 100;
bounds.height = 100;
const formField = new FormField();
formField.fieldType = FormField.FieldTypeEnum.Signature;
formField.pageNumber = 1;
formField.bounds = bounds;
const documentSigner = new DocumentSigner();
documentSigner.name = "Alex";
documentSigner.emailAddress = "alex@example.com";
documentSigner.signerType = DocumentSigner.SignerTypeEnum.Signer;
documentSigner.formFields = [formField];
const files = fs.createReadStream("agreement.pdf");
const sendForSign = new SendForSign();
sendForSign.title = "Agreement";
sendForSign.signers = [documentSigner];
sendForSign.files = [files];
const sendDocumentResponse = await documentApi.sendDocument(sendForSign);
console.log(sendDocumentResponse.documentId);
Here is what happens when the code runs:
Rectanglesets where the signature box sits on the page.FormFieldmakes that box a signature field on page 1.DocumentSignernames who signs and which fields they fill.sendDocumentuploads the PDF and emails the signer a link.
Our step-by-step guide on integrating eSignatures into your Node.js application goes further, with templates and in-app signing.
What should you watch out for?
Most early problems come from keys, regions and test data. A few habits save you time.
- Keep the API key in an environment variable on your server, never in front-end JavaScript.
- Match the base address to your account’s region, or calls will fail to find your data.
- Download any sandbox document you want to keep, since sandbox documents are deleted after 14 days.
- Expect a test watermark on sandbox documents. Live documents need a paid API plan.
Before launch, run through our Node.js eSignature integration checklist.
Which plan do you need for the API, and what does it cost?
You can build and test for free in the API sandbox, with no credit card. Sending live documents through the API needs the Enterprise API plan.
The Enterprise API plan starts at $30 a month and includes 40 envelopes. Each extra envelope costs $0.75. Prices are in USD.
Embedded signing, unlimited templates and custom branding are part of that plan. See the eSignature API page for what else it includes.
Where do you go from here?
Your next step depends on how far along your app is.
- Create a free API sandbox account and send your first test document.
- Book a demo to walk through your signing flow with our team.
- Read the Node.js SDK documentation or browse the SDK source on GitHub.
Have a suggestion or a feature request? Tell us through our support portal.
Frequently asked questions
Is there an e-signature JavaScript SDK for Node.js?
Yes. Our Node.js SDK is the boldsign package on npm. You call it from your server code in JavaScript or TypeScript to send, track and download signed documents.
How do I install the BoldSign Node.js SDK?
Run npm install boldsign in your project folder. The source code is public in the boldsign-node-sdk repository on GitHub, with example apps.
Which Node.js version does the BoldSign SDK need?
The SDK readme lists Node 12 or higher. A current long-term support release of Node.js is a safe choice for a new project.
Can I use the BoldSign SDK with TypeScript?
Yes. The package ships its own type definitions, and the readme on GitHub opens with a TypeScript example.
How does the Node.js SDK sign in to BoldSign?
You pass an API key with setApiKey, or an OAuth 2.0 access token with setDefaultAuthentication. Keep either one on your server, never in browser code.
Does the SDK work with a BoldSign account in Europe?
Yes. Pass your region's base address, such as api-eu.boldsign.com, when you create each API class. Canada and Australia have their own addresses too.
Is a document signed through the Node.js SDK legally binding?
Yes, when it meets the same rules as any electronic signature: the signer agrees to sign electronically and the record is kept. You can download each document's audit trail with the SDK.
Is the BoldSign API sandbox free?
Yes. The sandbox is free, and you sign up without a credit card. Sandbox documents carry a test watermark and are deleted after 14 days.