PHP · Integration

Add E-Signatures to PHP

Send documents for legally binding e-signature from your PHP application. One endpoint, no SDK required.

Quick start

  1. Get an API key from signb.ee (free, no credit card)
  2. Set SIGNBEE_API_KEY in your environment
  3. Add the code below to your app

PHP example

PHP
<?php
$data = json_decode(file_get_contents('php://input'), true);

$ch = curl_init('https://signb.ee/api/send');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode($data),
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('SIGNBEE_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_RETURNTRANSFER => true,
]);

$response = curl_exec($ch);
curl_close($ch);

header('Content-Type: application/json');
echo $response;

What happens

  1. Your app sends markdown or a PDF URL to Signbee
  2. Signbee generates a PDF (if markdown) and emails the recipient a signing link
  3. Recipient signs — both parties receive the signed PDF with SHA-256 certificate

Also works with AI agents

Install the MCP server to let Claude, Cursor, or Windsurf send documents directly:

npx -y signbee-mcp

Integration details

PHP powers over 75% of websites with known server-side languages. Adding e-signatures to PHP requires just cURL — a built-in extension available in virtually all PHP installations.

No framework required: The example uses pure PHP with cURL — no framework needed. This works on shared hosting, VPS, dedicated servers, or any environment with PHP and cURL enabled. It's the most universally compatible integration.

cURL vs Guzzle: The example uses PHP's built-in cURL functions. If your project uses Composer, consider Guzzle for cleaner syntax and better error handling. Both produce identical API calls.

WordPress integration: For WordPress sites, use wp_remote_post() instead of cURL. This uses WordPress's HTTP API with built-in retry logic, proxy support, and consistent error handling across different server configurations.

Error handling: Check curl_errno() and curl_error() after curl_exec() for network errors. Parse the response JSON and check for error keys returned by the API. Handle 401 (invalid key), 400 (missing fields), and 429 (rate limited) status codes.

PHP 8+ features: On PHP 8+, use named arguments for cleaner cURL configuration and match expressions for response status handling. The Fiber class (PHP 8.1+) enables async-like patterns for concurrent API calls.

FAQs

How do I add e-signatures to PHP?

Get an API key from signb.ee (free, no credit card), set SIGNBEE_API_KEY in your environment, and add a single POST request to your PHP application. The recipient receives a signing link by email, signs on any device, and both parties get a SHA-256 certified PDF.

Does Signbee work with PHP?

Yes. Signbee is a REST API that works with any language or framework including PHP. Send a POST request with your document content, sender and recipient details, and Signbee handles the entire signing ceremony. No SDK required.

Does PHP need any extra packages for Signbee?

No. The integration uses PHP's built-in cURL extension, which is available in virtually all PHP installations. No Composer packages or SDKs are required. If you prefer, use Guzzle for cleaner syntax.

Can I use Signbee with WordPress?

Yes. Use WordPress's built-in wp_remote_post() function instead of cURL. This provides consistent HTTP handling with retry logic and proxy support across different hosting environments.

Does Signbee work on shared hosting?

Yes. The PHP integration requires only cURL, which is enabled on virtually all shared hosting providers. No SSH access, Composer, or special PHP extensions needed.

Related resources

Try Signbee — free, no credit card.