---
title: "3 Steps: PHP Digital Signature SDK for PDFs | TurboDocx"
description: "3 steps to sign PDFs with the TurboDocx PHP digital signature SDK: composer require turbodocx/sdk, add your API key, call sendSignature(). Laravel ready."
url: "https://www.turbodocx.com/guides/sign-documents-with-php"
---

# How to Sign PDFs with the PHP Digital Signature SDK

> 3 steps to sign a PDF with the TurboDocx PHP digital signature SDK: install the TurboDocx SDK with `composer require turbodocx/sdk`, configure `TurboSign::configure()` with your API key, org ID, and sender email, then call `TurboSign::sendSignature()` with a request listing recipients and signature fields. TurboDocx emails each recipient a signing link automatically.

This guide shows you how to integrate e-signatures into your Laravel or Symfony application in under 5 minutes. Last updated: October 16, 2026.

At a glance: 5 min setup time, PHP 8.1+ (modern enums), type-safe (typed classes).

Links: [Get API key free](https://app.turbodocx.com), [GitHub SDK](https://github.com/TurboDocx/SDK/tree/main/packages/php-sdk), [Full API reference](https://docs.turbodocx.com/docs/SDKs/php).

## Agentic Quickstart Skill

Skip the boilerplate: your AI coding agent writes the integration. Install with:

```bash
npx skills add TurboDocx/quickstart
```

[How it works](https://www.turbodocx.com/quickstart.md)

## 1. Installation

Install the TurboDocx SDK via Composer. The package uses modern PHP 8.1+ features including enums and typed properties.

```bash
composer require turbodocx/sdk
```

Requirements: PHP 8.1+, Composer, ext-json, ext-fileinfo. Compatible with Laravel, Symfony, and vanilla PHP.

## 2. Obtaining an API Key

Before you begin, you'll need your API credentials from the TurboDocx dashboard.

1. [Sign up for a free account](https://app.turbodocx.com) at TurboDocx
2. Navigate to Settings → API Keys
3. Copy your API Key and Organization ID

```bash
TURBODOCX_API_KEY=your_api_key_here
TURBODOCX_ORG_ID=your_org_id_here
TURBODOCX_SENDER_EMAIL=you@company.com
TURBODOCX_SENDER_NAME=Your Company Name
```

## 3. Sending a Signing Request

Use the SDK to send a document for signature. The recipient will receive an email with a link to sign.

```php
<?php

use TurboDocx\TurboSign;
use TurboDocx\Config\HttpClientConfig;
use TurboDocx\Types\Recipient;
use TurboDocx\Types\Field;
use TurboDocx\Types\SignatureFieldType;
use TurboDocx\Types\TemplateConfig;
use TurboDocx\Types\FieldPlacement;
use TurboDocx\Types\Requests\SendSignatureRequest;

// Configure with your API credentials
TurboSign::configure(new HttpClientConfig(
    apiKey: $_ENV['TURBODOCX_API_KEY'],
    orgId: $_ENV['TURBODOCX_ORG_ID'],
    senderEmail: $_ENV['TURBODOCX_SENDER_EMAIL'],  // REQUIRED
    senderName: $_ENV['TURBODOCX_SENDER_NAME']     // Recommended
));

// Send document for signature
$result = TurboSign::sendSignature(
    new SendSignatureRequest(
        recipients: [
            new Recipient('John Doe', 'john@example.com', 1)
        ],
        fields: [
            new Field(
                type: SignatureFieldType::SIGNATURE,
                recipientEmail: 'john@example.com',
                template: new TemplateConfig(
                    anchor: '{signature1}',
                    placement: FieldPlacement::REPLACE,
                    size: ['width' => 100, 'height' => 30]
                )
            )
        ],
        file: file_get_contents('contract.pdf'),
        documentName: 'Partnership Agreement'
    )
);

echo "Document ID: {$result->documentId}\n";
```

Modern PHP: Uses PHP 8.1+ features like enums (`SignatureFieldType::SIGNATURE`) and named parameters for type safety.

## Next: Processing Results with Webhooks

Configure webhooks to receive real-time notifications when documents are signed. Verify the `X-TurboDocx-Signature` header with `verifyWebhookSignature()` against the raw request body before trusting a payload.

WebhookController.php (Laravel):

```php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use TurboDocx\TurboSign;
use function TurboDocx\Utils\verifyWebhookSignature;

class WebhookController extends Controller
{
    public function handle(Request $request)
    {
        $rawBody = $request->getContent();
        if (!verifyWebhookSignature(
            $rawBody,
            $request->header('X-TurboDocx-Signature', ''),
            $request->header('X-TurboDocx-Timestamp', ''),
            $_ENV['TURBODOCX_WEBHOOK_SECRET'],
        )) {
            return response()->json(['error' => 'invalid signature'], 401);
        }

        $event = $request->input('event');
        $data = $request->input('data');

        if ($event === 'signature.document.completed') {
            $documentId = $data['document_id'];

            // Download the signed PDF
            $signedPdf = TurboSign::download($documentId);

            // Save to storage
            Storage::put("signed/{$documentId}.pdf", $signedPdf);
        }

        return response()->json(['received' => true]);
    }
}
```

## Conclusion

You now have everything you need to integrate document signing into your PHP application using the TurboDocx [e-signature API](https://www.turbodocx.com/e-signature-api.md). The typed SDK handles authentication, document delivery, signature collection, and legally-binding audit trails.

What you can do next:

- Add multiple recipients with sequential signing order
- Use different field types: initials, dates, text, checkboxes
- Integrate with Laravel Queues for async processing
- Get audit trails and compliance certificates

## Related Guides

- [Sign Documents with TypeScript](https://www.turbodocx.com/guides/sign-documents-with-typescript.md): Fully typed e-signature integration with imported SDK types and tsconfig setup.
- [Sign Documents with JavaScript](https://www.turbodocx.com/guides/sign-documents-with-javascript.md): Integrate document signing into Node.js or TypeScript applications.
- [Sign Documents with Java](https://www.turbodocx.com/guides/sign-documents-with-java.md): Add document signing to Spring Boot or Maven projects.

## Resources

- [Full API Reference](https://docs.turbodocx.com/docs/SDKs): Complete SDK documentation with all methods.
- [GitHub Repository](https://github.com/TurboDocx/SDK/tree/main/packages/php-sdk): View source code, examples, and contribute.
- [Packagist](https://packagist.org/packages/turbodocx/sdk): View package info and version history.
- [Developer Hub](https://www.turbodocx.com/developers.md): All TurboDocx SDKs, API docs, and quickstarts.

## Frequently Asked Questions

### How do I sign a PDF with PHP?

Install the TurboDocx SDK (composer require turbodocx/sdk), configure it with your API key, then use TurboSign::sendSignature() to send the document for e-signature.

### Is there a PHP digital signature SDK for Composer projects?

Yes. composer require turbodocx/sdk installs a typed digital signature SDK for PHP 8.1+ with enums and typed request classes, so Laravel and Symfony apps get IDE autocomplete for recipients, fields, and signature placement.

### Does the PHP SDK work with Laravel?

Yes, the TurboDocx PHP SDK works with Laravel, Symfony, and any PHP 8.1+ application. It uses typed classes and enums for full IDE support.

### Is the PHP digital signature SDK free?

Yes. turbodocx/sdk is open source under the MIT license, and API access is included on every TurboDocx plan, including the Free plan with 5 e-signatures per month.

### What PHP version is required?

The TurboDocx PHP SDK requires PHP 8.1 or higher.

## Ready to Get Started?

Create a free account and get your API key. Start sending documents for signature in minutes.

[Get API key free](https://app.turbodocx.com) or [learn more about the e-signature API](https://www.turbodocx.com/e-signature-api.md).
