Skip to content
  1. Blog
  2. API

How to Send a Document for Electronic Signature via the BoldSign API

TL;DR: Here is how to send a document for electronic signature with the BoldSign API: send one request with your file, signer and signature field. The reply gives you a document ID, and a webhook confirms the send. Our eSignature API page covers everything else the API does.

Your app creates a contract, a sign-up form or an offer letter. Right now someone downloads it, emails it out and waits. You want your code to send it for signature the moment it is ready.

This guide walks through one API call that does that. You get sample code in six languages and a short list of things that trip people up.

What does a document mean in the BoldSign API?

A document is the container for one signing request, like a cover folder for a contract.

The folder holds the pages, the names of the people who sign and a note of where things stand.

In the API, one document holds one or more files plus the sender, the signers, the status and the history. Each one gets a unique documentId, which you use to track it, remind signers or download it later.

How do you send a document for signature with the API?

You send one request to https://api.boldsign.com/v1/document/send. Add a title, at least one signer and a file, and the API does the rest.

  1. Create a free API sandbox account and copy your API key.
  2. Add your file, or a public link to it, and a title.
  3. Add each signer with a name and an email address.
  4. Place a signature field with a page number and a position on the page.
  5. Send the request with your key in the X-API-KEY header.

The Send document reference lists every parameter, with the request and reply format.

What does the code look like?

Call Send document for electronic signature requests that your own code builds. The samples below send one PDF to one signer, with one signature field on page 1.

Pick your language from the tabs. Every software development kit (SDK) sample and the curl command make the same call.

curl -X POST \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {YOUR_API_KEY}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'Message=' \
  -F 'Signers={
  "name": "Test",
  "emailAddress": "alexgayle@cubeflakes.com",
  "signerType": "Signer",
  "deliveryMode": "Email",
  "formFields": [
    {
      "id": "signature1",
      "fieldType": "Signature",
      "pageNumber": 1,
      "bounds": {
        "x": 80,
        "y": 50,
        "width": 31,
        "height": 21
      },
      "isRequired": true
    }
  ],
  "locale": "EN"
}' \
  -F 'Files=@{FILE_PATH};type=application/pdf' \
  -F 'Title=Title'
var apiClient = new ApiClient("https://api.boldsign.com", "YOUR_API_KEY");

var documentClient = new DocumentClient(apiClient);

var documentFilePath = new DocumentFilePath
{
    ContentType = "application/pdf",
    FilePath = "FILE_PATH",
};

var filesToUpload = new List<IDocumentFile>
{
    documentFilePath,
};

var signatureField = new FormField(
    id: "signature1",
    isRequired: true,
    type: FieldType.Signature,
    pageNumber: 1,
    bounds: new Rectangle(x: 80, y: 50, width: 31, height: 21));

var signer = new DocumentSigner(
    signerName: "Test",
    signerType: SignerType.Signer,
    signerEmail: "alexgayle@cubeflakes.com",
    formFields: new List<FormField> { signatureField },
    locale: Locales.EN);

var documentSigners = new List<DocumentSigner>
{
    signer
};

var sendForSign = new SendForSign
{
    Title = "DOCUMENT_TITLE",
    Signers = documentSigners,
    Files = filesToUpload
};

var documentCreated = documentClient.SendDocument(sendForSign);
import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    document_api = boldsign.DocumentApi(api_client)

    signatureField = boldsign.FormField(
        fieldType="Signature",
        pageNumber=1,
        bounds=boldsign.Rectangle(x=80, y=50, width=31, height=21),
        isRequired=True,
        id="signature1",
    )

    signer = boldsign.DocumentSigner(
        name="Test",
        emailAddress="alexgayle@cubeflakes.com",
        signerType="Signer",
        formFields=[signatureField],
        locale="EN",
    )

    send_for_sign = boldsign.SendForSign(
        title="DOCUMENT_TITLE",
        signers=[signer],
        files=["FILE_PATH"],
    )

    document_created = document_api.send_document(send_for_sign=send_for_sign)
import { DocumentApi, DocumentSigner, FormField, Rectangle, SendForSign } from "boldsign";
import * as fs from "fs";

async function main() {
  const api = new DocumentApi();
  api.setApiKey("YOUR_API_KEY");

  const bounds = new Rectangle();
  bounds.x = 80;
  bounds.y = 50;
  bounds.width = 31;
  bounds.height = 21;

  const signatureField = new FormField();
  signatureField.fieldType = FormField.FieldTypeEnum.Signature;
  signatureField.pageNumber = 1;
  signatureField.bounds = bounds;
  signatureField.id = "signature1";
  signatureField.isRequired = true;

  const signer = new DocumentSigner();
  signer.name = "Test";
  signer.emailAddress = "alexgayle@cubeflakes.com";
  signer.signerType = DocumentSigner.SignerTypeEnum.Signer;
  signer.formFields = [signatureField];
  signer.locale = "EN";

  const send = new SendForSign();
  send.title = "DOCUMENT_TITLE";
  send.signers = [signer];
  send.files = [fs.createReadStream("FILE_PATH")];

  const documentCreated = await api.sendDocument(send);
}

main();
ApiClient client = Configuration.getDefaultApiClient();

client.setApiKey("YOUR_API_KEY");

DocumentApi documentApi = new DocumentApi(client);

FormField signatureField = new FormField();
signatureField.setFieldType(FieldTypeEnum.SIGNATURE);
signatureField.setPageNumber(1);
signatureField.setBounds(new Rectangle().x(80f).y(50f).width(31f).height(21f));
signatureField.setIsRequired(true);
signatureField.setId("signature1");

List<FormField> formFields = new ArrayList<FormField>();
formFields.add(signatureField);

DocumentSigner signer = new DocumentSigner();
signer.setName("Test");
signer.setEmailAddress("alexgayle@cubeflakes.com");
signer.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer.setFormFields(formFields);
signer.setLocale(DocumentSigner.LocaleEnum.EN);

List<DocumentSigner> signers = new ArrayList<DocumentSigner>();
signers.add(signer);

File file = new File("{FILE_PATH}");
List<File> files = new ArrayList<File>();
files.add(file);

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

DocumentCreated documentCreated = documentApi.sendDocument(sendForSign);
<?php

require_once "vendor/autoload.php";

$config = new BoldSign\Configuration();
$config->setApiKey('YOUR_API_KEY');

$document_api = new BoldSign\Api\DocumentApi($config);

$signatureField = new BoldSign\Model\FormField();
$signatureField->setId("signature1");
$signatureField->setFieldType('Signature');
$signatureField->setPageNumber(1);
$signatureField->setBounds(new BoldSign\Model\Rectangle([80, 50, 31, 21]));
$signatureField->setIsRequired(true);

$signer = new BoldSign\Model\DocumentSigner();
$signer->setName("Test");
$signer->setEmailAddress("alexgayle@cubeflakes.com");
$signer->setSignerType("Signer");
$signer->setFormFields([$signatureField]);
$signer->setLocale("EN");

$send_for_sign = new BoldSign\Model\SendForSign();
$send_for_sign->setTitle('DOCUMENT_TITLE');
$send_for_sign->setSigners([$signer]);
$send_for_sign->setFiles(['FILE_PATH']);

$documentCreated = $document_api->sendDocument($send_for_sign);

Replace YOUR_API_KEY and FILE_PATH with your own values. The same code shows how to send contracts for electronic signature, offer letters or consent forms: only the file changes.

Why does the API return a document ID before the document is sent?

Sending runs in the background, so you get the document ID right away. The file may still be processing when your code moves on.

Listen to webhooks to learn how the send ended. You get a Sent event when it works and a SendFailed event with an error message when it fails.

Fix the cause in the error message before you send again. The webhooks guide shows how to set them up, and verify webhook events shows how to check each event came from us.

How do you send secure documents through the API?

Keep your API key on your server and add an authentication step for each signer. Our API page states that requests travel over Transport Layer Security (TLS) and that data is protected with 256-bit Advanced Encryption Standard (AES) encryption.

Set AuthenticationType on a signer to make them prove who they are before the document opens. The choices are an access code, a one-time code by email or text, ID verification and knowledge-based authentication (KBA).

What should you watch out for?

Most failed sends come down to a few details. Check these before you go live.

  • Use Files or FileUrls in one request, never both.
  • Give every form field a width and height above zero.
  • Send PDFs, images or Office files, up to 25 per request.
  • Keep each document within 25 megabytes and 1,000 pages.
  • Expect a document to expire after 60 days unless you set ExpiryDays.

What else can you do once a document is sent?

The same API lets you track a document, send reminders, add signer authentication or download the audit trail. You can also skip field placement by sending from a saved template.

The send document from template guide shows that call. Our post on why webhooks matter in an API integration explains the event side in more depth.

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

You can build and test for free, and you pay once you go live. These prices come from the BoldSign pricing page in November 2026, in USD.

The free API sandbox gives full API access with no credit card. Sandbox documents carry a “This is a test document” watermark and are deleted after 14 days.

The Enterprise API plan adds live access and webhooks. It starts at $30 a month with 40 envelopes, and each extra envelope costs $0.75. Signer authentication by text, ID verification and delivery by text message are on this plan too.

Where do you go next with the BoldSign API?

Send a test document to yourself first, then point the code at your real files.

Frequently asked questions

What do I need to send my first document through the BoldSign API?

You need an API key, a file, and one signer with a name and email address. A free API sandbox account gives you a key without a credit card.

Which endpoint sends a document for signature?

Send a request to https://api.boldsign.com/v1/document/send with your API key in the request header. The reply holds the new document ID.

Why does the API return a document ID before the document is sent?

Sending runs in the background, so the first reply only holds the document ID. A Sent or SendFailed webhook tells you how the send ended.

Which file types can I send for signature with the API?

The send endpoint takes PDFs and images, plus Office files from Word, Excel and PowerPoint. PDF is preferred. Each request holds up to 25 files, and each document can reach 25 megabytes and 1,000 pages.

Do signers need a BoldSign account to sign?

No. Signers open the request from their email and sign without registering or paying. Only the sender needs an account.

How do I make sure only the right person opens the document?

Set an authentication type on the signer, such as an access code, a one-time email code or ID verification. The signer must pass it before the document opens.

Is a document signed through the API legally binding?

Yes, when it meets the same rules as any electronic signature: the signer agrees to sign electronically and the record is kept. Check the rules for your document type and country.

Can I test the API for free before I pay?

Yes. The free API sandbox gives full API access with no credit card. Sandbox documents carry a test watermark and are deleted after 14 days.

James Agini Muganya

James Agini Muganya is a Technical Assistant at BoldSign. He creates content in various formats, including API tutorials, help articles, and comprehensive guides.

More posts by James Agini Muganya
Get started

Sign up for your free trial today!

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