Official PHP client for SignRequest.com — send documents for digital signing, manage templates, teams and webhooks through the SignRequest REST API.
Why this fork? This is a published fork of
SignRequest/signrequest-php-client, republished so it can be installed on PHP 8+ projects. We opened a pull request against the original package but couldn't wait for it to be processed. Once the upstream package supports PHP 8+, this fork will be removed.
This is a plain PHP SDK generated with Swagger Codegen on top of Guzzle. It is framework-agnostic — there is no Laravel service provider, config publishing or facade.
- PHP
^7.2.5 || ^8.0 - Extensions:
ext-curl,ext-json,ext-mbstring guzzlehttp/guzzle^7.3
Install the package via Composer:
composer require marshmallow/signrequest-clientThe package is autoloaded under the SignRequest\ namespace (PSR-4). If you are not using Composer's autoloader yet, require it:
require_once __DIR__ . '/vendor/autoload.php';All requests are authenticated with a SignRequest API token, sent as an Authorization: Token <your-api-key> header. You can find your token in your SignRequest account settings.
Configure it once on the shared Configuration instance:
$config = SignRequest\Configuration::getDefaultConfiguration()
->setApiKey('Authorization', 'YOUR_API_KEY')
->setApiKeyPrefix('Authorization', 'Token');The default API base URL is https://signrequest.com/api/v1. You can override it with $config->setHost('https://...') if needed.
Each resource has its own API class under SignRequest\Api. Instantiate it with a Guzzle client and your configured Configuration, then call the typed methods. Example — creating a document:
<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure API key authorization: Token
$config = SignRequest\Configuration::getDefaultConfiguration()
->setApiKey('Authorization', 'YOUR_API_KEY')
->setApiKeyPrefix('Authorization', 'Token');
$apiInstance = new SignRequest\Api\DocumentsApi(
// If omitted, a default GuzzleHttp\Client is used.
new GuzzleHttp\Client(),
$config
);
$data = new \SignRequest\Model\Document();
// ...populate $data...
try {
$result = $apiInstance->documentsCreate($data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DocumentsApi->documentsCreate: ', $e->getMessage(), PHP_EOL;
}Every API method also has an asynchronous counterpart (e.g. documentsCreateAsync()) returning a Guzzle promise.
All classes live in the SignRequest\Api namespace. See the linked docs for every method, parameter and return type.
| API class | Description | Docs |
|---|---|---|
ApiTokensApi |
Manage API tokens | docs |
DocumentsApi |
Create, read, list and delete documents | docs |
DocumentAttachmentsApi |
Manage document attachments | docs |
DocumentsSearchApi |
Search documents | docs |
EventsApi |
Read account events | docs |
SignrequestsApi |
Send and manage sign requests | docs |
SignrequestQuickCreateApi |
Create a sign request in one call | docs |
TemplatesApi |
Manage templates | docs |
TeamsApi |
Manage teams | docs |
TeamMembersApi |
Manage team members | docs |
WebhooksApi |
Manage webhooks | docs |
Request/response models live in the SignRequest\Model namespace and are documented under docs/Model.
- Generated client reference:
docs/Apianddocs/Model - SignRequest REST API: https://signrequest.com/api/v1
- Upstream package: SignRequest/signrequest-php-client
composer install
./vendor/bin/phpunit- SignRequest — original author of the client
- Stef van Esch / Marshmallow — PHP 8+ fork
- All Contributors
The MIT License (MIT). Please see the License File for more information.
