PHP SDK for
Secure eSignature Integration
Integrate legally binding e-signatures into your PHP applications in minutes with a production-ready SDK and clear developer documentation.
setApiKey('YOUR_API_KEY');
$templateApi = new TemplateApi($config);
// Signer role
$role = (new Role())
->setRoleIndex(1)
->setSignerName('Richard')
->setSignerEmail('richard@cubeflakes.com');
// Send document using template
$document = (new SendForSignFromTemplateForm())->setRoles([$role]);
$response = $templateApi->sendUsingTemplate('YOUR_TEMPLATE_ID', $document);
composer require boldsign/boldsign-php
Built for Secure PHP eSignature Workflows
Create secure, compliant eSignature workflows seamlessly within modern PHP applications and backend services.
Advanced Signer Verification
Configure AccessCode, Email OTP, SMS OTP, or Identity Verification directly in API calls.
Real-time document events
Receive real-time document and signing events with reliable delivery retries for up to 8 hours.
Templates & Text Tags
Reuse document templates and automatically place fields using Text Tags.
In-App sending & Signing
Keep users inside your app by embedding secure document sending and signing flows.
Multi-Tenancy Support
Send on behalf of users with team management, custom branding, and multi‑tenant scalability.
Security & Compliance
ESIGN, UETA, SOC 2, and eIDAS compliant with enterprise-grade encryption and audit trails.
Code Examples
setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
// Create a form field
$form_field = new FormField();
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle([100, 100, 100, 50]);
$form_field->setBounds($bounds);
// Create a signer for the document
$document_signer = new DocumentSigner();
$document_signer->setName("Signer Name");
$document_signer->setEmailAddress("signer@example.com");
$document_signer->setSignerType("Signer");
$document_signer->setFormFields([$form_field]);
// Create the SendForSign request object
$send_for_sign = new SendForSign();
$files = new FileInfo();
$files = 'YOUR_FILE_PATH';
$send_for_sign->setFiles([$files]);
$send_for_sign->setSigners([$document_signer]);
$send_for_sign->setTitle('Document SDK API');
// Send the document for signing
$document_created = $document_api->sendDocument($send_for_sign);
setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
// Add a form field
$form_field = new FormField();
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle([50, 100, 100, 60]);
$form_field->setBounds($bounds);
// Add a signer details
$document_signer = new DocumentSigner();
$document_signer->setName('Signer Name');
$document_signer->setEmailAddress('signer@example.com');
$document_signer->setSignerType('Signer');
$document_signer->setFormFields([$form_field]);
// Create an embedded document request
$embedded_document_request = new EmbeddedDocumentRequest();
$embedded_document_request->setTitle('Sent from API Php SDK');
$embedded_document_request->setSendViewOption('FillingPage');
$embedded_document_request->setShowToolbar(true);
$embedded_document_request->setSigners([$document_signer]);
$embedded_document_request->setFiles(['YOUR_FILE_PATH']);
// Create the embedded signing request and generate the signing URL
$embedded_send_created = $document_api->createEmbeddedRequestUrlDocument($embedded_document_request);
setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
// Specify the document ID
$document_id = 'YOUR_DOCUMENT_ID';
// Specify the email address of the signer
$signer_email = 'signer@example.com';
// Generate the embedded signing link for the specified signer
$embedded_signing_link = $document_api->getEmbeddedSignLink($document_id, $signer_email);
setApiKey('YOUR_API_KEY');
$template_api = new TemplateApi($config);
$form_field = new FormField();
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle([50, 100, 100, 60]);
$form_field->setBounds($bounds);
// Define a role for the template
$role = new TemplateRole();
$role->setIndex(1);
$role->setName('HR');
$role->setDefaultSignerName('Signer Name');
$role->setDefaultSignerEmail('signer@example.com');
$role->setSignerType('Signer');
$role->setFormFields([$form_field]);
// Create the template request
$create_template = new CreateTemplateRequest();
$create_template->setTitle('Document SDK API');
$create_template->setDocumentTitle('title of the document');
$create_template->setRoles([$role]);
$create_template->setFiles(['YOUR_FILE_PATH']);
// Create the template in BoldSign
$template_created = $template_api->createTemplate([$create_template]);
setApiKey('YOUR_API_KEY');
$documentApi = new DocumentApi($config);
$bounds = new Rectangle();
$bounds->setX(100);
$bounds->setY(100);
$bounds->setWidth(100);
$bounds->setHeight(50);
// Add required signature form field
$field = new FormField();
$field->setId("Signature1");
$field->setFieldType(FormField::FIELD_TYPE_SIGNATURE);
$field->setPageNumber(1);
$field->setBounds($bounds);
$field->setIsRequired(true);
// Configure identity verification settings
$idVerification = new IdentityVerificationSettings();
$idVerification->setType(IdentityVerificationSettings::TYPE_EVERY_ACCESS);
$idVerification->setMaximumRetryCount(10);
$idVerification->setRequireLiveCapture(true);
$idVerification->setRequireMatchingSelfie(true);
$idVerification->setNameMatcher(IdentityVerificationSettings::NAME_MATCHER_STRICT);
$idVerification->setAllowedDocumentTypes(["Passport", "IDCard", "DriverLicense"]);
// configure the document signer
$signer = new DocumentSigner();
$signer->setName("Signer Name");
$signer->setEmailAddress("signer@example.com");
$signer->setSignerType(DocumentSigner::SIGNER_TYPE_SIGNER);
$signer->setAuthenticationType(DocumentSigner::AUTHENTICATION_TYPE_ID_VERIFICATION);
$signer->setIdentityVerificationSettings($idVerification);
$signer->setFormFields([$field]);
$signer->setLocale("EN");
// Create the SendForSign request
$sendForSign = new SendForSign();
$sendForSign->setTitle("DOCUMENT_TITLE");
$sendForSign->setSigners([$signer]);
$sendForSign->setFiles(["YOUR_FILE_PATH"]);
// Send the document for signing with ID verification enabled
$documentCreated = $documentApi->sendDocument($sendForSign);
Common Workflows
Built for applications that need reliable, automated e‑signature workflows through the PHP SDK, without added complexity.
Contracts & Agreements
Automate contract sending, signer tracking, and completion using PHP SDK calls and webhooks.
HR Document Workflows
Integrate signing into PHP‑based onboarding systems for offer letters and employee agreements.
Healthcare
Handle compliant consent and authorization workflows using API‑driven signing with audit trails.
Financial Services
Automate agreement and compliance document flows with secure signing and real‑time status updates.
Real Estate
Manage real estate workflows in PHP by programmatically sending, tracking, and finalizing property agreements.
SaaS Platforms
Embed eSignature capabilities into your PHP application to provide smooth, in‑app signing experiences for your customers.
- Key stats
Why BoldSign?
Years in business
Countries
Customers
Uptime reliability
Ready to Get Started?
Start building secure, scalable e‑signature workflows in your PHP applications with the production‑ready BoldSign PHP SDK.
Explore more articles on this topic
Explore more articles, setup guides, and recommended practices for working with the BoldSign PHP SDK.
Integrate Electronic Signatures in PHP with the BoldSign PHP SDK
Integrate PHP eSignature functionality into your applications with the BoldSign PHP SDK.
How to integrate eSignatures into Your PHP Laravel Application
Embed e‑signatures in your PHP application so users can sign without leaving it.
Frequently asked questions
The PHP SDK typically supports PHP 7.4 and higher. It is recommended to use the latest stable PHP version for better performance and security.
The SDK can be installed using composer require boldsign/boldsign-php. For more details refer to this guide: PHP installation guide.
Authentication is handled using an API key or access token, which must be passed when initializing the SDK client.
Yes. The BoldSign PHP SDK supports embedded signing, allowing signers to complete signing without leaving your application.
BoldSign supports commonly used formats such as PDF, JPG, PNG, DOCX, and Excel (.xlsx) for document signing workflows. For more, refer to this guide on supported file formats and file sizes.
Yes. You can create, manage, and send documents using templates, allowing you to reuse document structures and fields efficiently.
You can track document and signing request status in real time by configuring BoldSign webhooks to listen for document lifecycle events such as sent, viewed, signed, completed, or declined. For more, refer to this guide: webhook events.
You can get help quickly by using the BoldSign Support Portal or consulting the official BoldSign documentation, which covers common issues, API usage, and troubleshooting steps.
Sign up for your free trial today!
- 30-day free trial
- No credit card required
- 30-day free trial
- No credit card required