Skip to content
  1. Blog
  2. General

Integrate Electronic Signatures in PHP with the BoldSign PHP SDK

TL;DR: The BoldSign software development kit (SDK) for PHP: Hypertext Preprocessor (PHP) adds electronic signatures to a PHP app with a few lines of code. You install it with Composer, send a document, check its status and download the signed PDF. Our PHP SDK page shows what the SDK covers.

Say you run a PHP app for a small rental business. Each new tenant must sign a lease, and you want the app to send it, see when it is signed, and file the signed PDF.

You could write each web request to an eSignature service by hand. The BoldSign PHP SDK does that work for you, so your code stays short.

This guide covers plain PHP. For a Laravel project, read our guide on how to integrate eSignatures into a PHP Laravel application.

What is the BoldSign PHP SDK?

The BoldSign PHP SDK is a free code library for PHP electronic signature work. It gives you a digital signature API PHP code can call through ready-made methods.

Think of a remote control for a television. You press one button for a channel and never see the signal it sends. The SDK works the same way: you call sendDocument, and it builds and sends the request.

Is a PHP digital signature the same as an electronic signature?

Not quite, though many people use the two words for the same thing. A digital signature is one type of electronic signature that uses certificates and encryption to show the file was not changed.

Most developers who look for digital signature PHP code want their users to sign a document online. Our guide to electronic signature vs digital signature explains the difference in more detail.

Why is eSignature PHP integration hard without an SDK?

Without an SDK, you write every request, header and file upload yourself. That code takes time to build, and you must keep it working as the API changes.

  • Each request needs your API key, the right address and the right data format.
  • Sending, tracking and downloading a document take several separate calls.
  • Your team must build and maintain its own wrapper code for these calls.

What can the BoldSign PHP 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 document for signature with sendDocument.
  • Send a saved template with sendUsingTemplate.
  • Show the signing page inside your app with getEmbeddedSignLink.
  • Check a document’s status with getProperties.
  • Download the signed PDF with downloadDocument and the audit trail with downloadAuditLog.

How do you install the PHP digital signature SDK?

Run one Composer command in your project folder. The package is boldsign/boldsign-php on Packagist.

composer require boldsign/boldsign-php

The SDK needs PHP 7.4 or later, including PHP 8. Your PHP setup also needs the curl, json and mbstring extensions turned on.

How do you set up your API key?

Create a free API sandbox account, then create an API key in the web app. Our API key guide shows each step.

Load the SDK and pass your key to a Configuration object. Keep the key in an environment variable or a config file, not in code you share.

<?php

require_once __DIR__ . '/vendor/autoload.php';

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

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

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

How do you send a document for signature in PHP?

Describe the signature field, the signer and the file, then call sendDocument. That one call is the core of any electronic signature PHP flow, and the response holds the new document’s ID.

<?php

$bounds = new BoldSign\Model\Rectangle();
$bounds->setX(100);
$bounds->setY(100);
$bounds->setWidth(100);
$bounds->setHeight(50);

$signatureField = new BoldSign\Model\FormField();
$signatureField->setFieldType('Signature');
$signatureField->setPageNumber(1);
$signatureField->setBounds($bounds);

$signer = new BoldSign\Model\DocumentSigner();
$signer->setName('Alex');
$signer->setEmailAddress('alex@example.com');
$signer->setSignerType('Signer');
$signer->setFormFields([$signatureField]);

$sendForSign = new BoldSign\Model\SendForSign();
$sendForSign->setTitle('Lease agreement');
$sendForSign->setSigners([$signer]);
$sendForSign->setFiles(['lease.pdf']);

$documentCreated = $documentApi->sendDocument($sendForSign);
echo $documentCreated->getDocumentId();

The bounds set where the signature box sits on page 1. Alex then gets an email with a link to sign. Our step-by-step getting started guide walks through each part of this code.

How do you check the status and download the signed PDF?

Call getProperties with the document ID to read its status. Call downloadDocument to get the signed PDF once the status shows the document is complete.

<?php

$documentId = 'YOUR_DOCUMENT_ID';

$properties = $documentApi->getProperties($documentId);
echo $properties->getStatus();

$signedFile = $documentApi->downloadDocument($documentId);
copy($signedFile->getPathname(), 'signed-lease.pdf');

Signers finish in their own time, so checking again and again wastes calls. A webhook tells your app the moment a document is signed. Our webhooks documentation shows how to set one up.

Where is the PHP electronic signature source code?

The SDK source code is public in our boldsign-php-sdk repository on GitHub. It uses the Massachusetts Institute of Technology (MIT) License, a short open source license.

The repository lists every class, method and data model 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 one, gives you sandbox API access for testing. Live API calls, embedded signing and webhooks need the Enterprise API plan, from $30 a month with 40 envelopes, billed yearly.

Each extra envelope on the Enterprise API plan costs $0.75. Prices are in USD, as of November 2026, and the pricing page lists every plan.

What can you build next with eSignature PHP code?

The same few methods work for leases, offer letters, consent forms or any other document. Start in the sandbox, then move to live calls when your flow works.

Frequently asked questions

Is there a PHP SDK for electronic signatures?

Yes. We publish the boldsign/boldsign-php package on Packagist. You install it with Composer and call our eSignature API through PHP classes.

How do I install the BoldSign PHP SDK?

Run composer require boldsign/boldsign-php in your project folder. Then load vendor/autoload.php in your script and set your API key.

Which PHP versions does the BoldSign SDK support?

The SDK runs on PHP 7.4 and PHP 8. Your server also needs the curl, json and mbstring extensions turned on.

Where can I find the PHP electronic signature source code?

The SDK source code is public in our boldsign-php-sdk repository on GitHub, under an open source license. The repository also documents every class and method.

Is a PHP digital signature the same as an electronic signature?

Not quite. A digital signature is one type of electronic signature that uses certificates and encryption. Many people use both words to mean signing a document online.

Are documents signed through the BoldSign PHP SDK legally binding?

Yes, when the signing meets the electronic signature laws that apply to your document. Documents sent from PHP go through the same signing steps and audit trail as the BoldSign web app.

Can I test the BoldSign API in PHP for free?

Yes. A free API sandbox account gives you an API key for test documents. You can run all your PHP code there before you send real documents.

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 in USD. Each extra envelope costs $0.75.

BoldSign Team

The official team behind BoldSign—the simple, secure eSignature solution trusted by businesses worldwide. Our platform helps individuals and teams create, sign, and manage documents effortlessly while maintaining full compliance. Experience BoldSign yourself with a free trial or request a personalized demo to see it in action.

More posts by BoldSign Team
Get started

Sign up for your free trial today!

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