Skip to content

boldsign/boldsign-php-sdk

Repository files navigation

boldsign/php

Easily integrate BoldSign's e-signature features into your PHP applications. This SDK simplifies sending documents for signature, embedding signing ceremonies, tracking document status, downloading signed documents, and managing e-signature workflows.

Installation & Usage

Requirements

PHP 7.4 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
    "require": {
        "boldsign/php": "1.0.0"
    },
    "minimum-stability": "dev"
}

Then run composer install

Alternatively, install directly with

composer require boldsign/php:1.0.0

Getting Started

Please follow the installation procedure and then run the following:

<?php

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

// Configure API key authorization: X-API-KEY
$config = new BoldSign\Configuration();
$config->setApiKey('YOUR_API_KEY');

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

$bounds = new BoldSign\Model\Rectangle([100, 100, 100, 50]);

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

// Set the signers
$signer = new BoldSign\Model\DocumentSigner();
$signer->setName("David");
$signer->setEmailAddress("david@example.com");
$signer->setSignerType("Signer");
$signer->setFormFields([$signatureField]);

$send_for_sign = new BoldSign\Model\SendForSign();
$send_for_sign->setTitle('Agreement');
$send_for_sign->setSigners([$signer]);
$send_for_sign->setFiles(['\tests\data\agreement.pdf']);

$documentCreated = $documentApi->sendDocument($send_for_sign);

API Endpoints

All URIs are relative to https://api.boldsign.com

Class Method HTTP request Description
BrandingApi brandList GET /v1/brand/list List all the brands.
BrandingApi createBrand POST /v1/brand/create Create the brand.
BrandingApi deleteBrand DELETE /v1/brand/delete Delete the brand.
BrandingApi editBrand POST /v1/brand/edit Edit the brand.
BrandingApi getBrand GET /v1/brand/get Get the specific brand details.
BrandingApi resetDefaultBrand POST /v1/brand/resetdefault Reset default brand.
ContactsApi contactUserList GET /v1/contacts/list List Contact document.
ContactsApi createContact POST /v1/contacts/create Create the new Contact.
ContactsApi deleteContacts DELETE /v1/contacts/delete Deletes a contact.
ContactsApi getContact GET /v1/contacts/get Get summary of the contact.
ContactsApi updateContact PUT /v1/contacts/update Update the contact.
CustomFieldApi createCustomField POST /v1/customField/create Create the custom field.
CustomFieldApi customFieldsList GET /v1/customField/list List the custom fields respective to the brand id.
CustomFieldApi deleteCustomField DELETE /v1/customField/delete Delete the custom field.
CustomFieldApi editCustomField POST /v1/customField/edit Edit the custom field.
CustomFieldApi embedCustomField POST /v1/customField/createEmbeddedCustomFieldUrl Generates a URL for creating or modifying custom fields within your application's embedded Designer.
DocumentApi addAuthentication PATCH /v1/document/addAuthentication The add authentication to recipient.
DocumentApi addTag PATCH /v1/document/addTags Add the Tags in Documents.
DocumentApi behalfDocuments GET /v1/document/behalfList Gets the behalf documents.
DocumentApi changeAccessCode PATCH /v1/document/changeAccessCode Changes the access code for the given document signer.
DocumentApi changeRecipient PATCH /v1/document/changeRecipient Change recipient details of a document.
DocumentApi createEmbeddedRequestUrlDocument POST /v1/document/createEmbeddedRequestUrl Generates a send URL which embeds document sending process into your application.
DocumentApi deleteDocument DELETE /v1/document/delete Delete the document.
DocumentApi deleteTag DELETE /v1/document/deleteTags Delete the Tags in Documents.
DocumentApi downloadAttachment GET /v1/document/downloadAttachment Download the Attachment.
DocumentApi downloadAuditLog GET /v1/document/downloadAuditLog Download the audit trail document.
DocumentApi downloadDocument GET /v1/document/download Download the document.
DocumentApi extendExpiry PATCH /v1/document/extendExpiry Extends the expiration date of the document.
DocumentApi getEmbeddedSignLink GET /v1/document/getEmbeddedSignLink Get sign link for Embedded Sign.
DocumentApi getProperties GET /v1/document/properties Get summary of the document.
DocumentApi listDocuments GET /v1/document/list List user documents.
DocumentApi prefillFields PATCH /v1/document/prefillFields Updates the value (prefill) of the fields in the document.
DocumentApi remindDocument POST /v1/document/remind Send reminder to pending signers.
DocumentApi removeAuthentication PATCH /v1/document/RemoveAuthentication Remove the access code for the given document signer.
DocumentApi revokeDocument POST /v1/document/revoke Revoke the document.
DocumentApi sendDocument POST /v1/document/send Sends the document for sign.
DocumentApi teamDocuments GET /v1/document/teamlist Get user Team documents.
PlanApi apiCreditsCount GET /v1/plan/apiCreditsCount Gets the Api credits details.
SenderIdentitiesApi createSenderIdentities POST /v1/senderIdentities/create Creates sender identity.
SenderIdentitiesApi deleteSenderIdentities DELETE /v1/senderIdentities/delete Deletes sender identity.
SenderIdentitiesApi listSenderIdentities GET /v1/senderIdentities/list Lists sender identity.
SenderIdentitiesApi reRequestSenderIdentities POST /v1/senderIdentities/rerequest Rerequests denied sender identity.
SenderIdentitiesApi resendInvitationSenderIdentities POST /v1/senderIdentities/resendInvitation Resends sender identity invitation.
SenderIdentitiesApi updateSenderIdentities POST /v1/senderIdentities/update Updates sender identity.
TeamsApi createTeam POST /v1/teams/create Create Team.
TeamsApi getTeam GET /v1/teams/get Get Team details.
TeamsApi listTeams GET /v1/teams/list List Teams.
TeamsApi updateTeam PUT /v1/teams/update Update Team.
TemplateApi addTag PATCH /v1/template/addTags Add the Tags in Templates.
TemplateApi createEmbeddedRequestUrlTemplate POST /v1/template/createEmbeddedRequestUrl Generates a send URL using a template which embeds document sending process into your application.
TemplateApi createEmbeddedTemplateUrl POST /v1/template/createEmbeddedTemplateUrl Generates a create URL to embeds template create process into your application.
TemplateApi createTemplate POST /v1/template/create Creates a new template.
TemplateApi deleteTag DELETE /v1/template/deleteTags Delete the Tags in Templates.
TemplateApi deleteTemplate DELETE /v1/template/delete Deletes a template.
TemplateApi download GET /v1/template/download Download the template.
TemplateApi editTemplate PUT /v1/template/edit Edit and updates an existing template.
TemplateApi getEmbeddedTemplateEditUrl POST /v1/template/getEmbeddedTemplateEditUrl Generates a edit URL to embeds template edit process into your application.
TemplateApi getProperties GET /v1/template/properties Get summary of the template.
TemplateApi listTemplates GET /v1/template/list List all the templates.
TemplateApi mergeAndSend POST /v1/template/mergeAndSend Send the document by merging multiple templates.
TemplateApi sendUsingTemplate POST /v1/template/send Send a document for signature using a Template.
UserApi cancelInvitation POST /v1/users/cancelInvitation Cancel the users invitation.
UserApi createUser POST /v1/users/create Create the user.
UserApi getUser GET /v1/users/get Get summary of the user.
UserApi listUsers GET /v1/users/list List user documents.
UserApi resendInvitation POST /v1/users/resendInvitation Resend the users invitation.
UserApi updateUser PUT /v1/users/update Update new User role.

Models

Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

X-API-KEY

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1
    • Package version: 1.0.0
    • Generator version: 7.8.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

PHP SDK for BoldSign API

Resources

License

Stars

Watchers

Forks

Packages

No packages published