How to configure signature types for the signers via BoldSign API?
In BoldSign, users can configure which signature types are available to signers during document signing. By default, all signature types are enabled. However, using the API, you can restrict or allow only specific signature types when sending an eSignature request.
Supported signature types
BoldSign supports the following signature types:
| Signature Type | Description |
|---|---|
| Draw | Signer draws their signature/initial on screen |
| Text | Signer selects from auto-generated text styles |
| Image | Signer uploads an image of their signature/initial |
Signature type configuration
To configure signature types via the BoldSign API, include the following property in your request payload:
-
Set the
fieldTypeproperty toSignatureorInitial. -
Set the
allowedSignatureTypesproperty to one or more of the following options:"Draw", "Text", "Image".
Example code snippet
Here are example code snippet for configuring signature types in a BoldSign API request:
Curl
curl -X 'POST' \
'https://api.boldsign.com/v1/document/send' \
-H 'accept: application/json' \
-H 'X-API-KEY: {YOUR API KEY}' \
-H 'Content-Type: multipart/form-data' \
-F 'message=sign' \
-F 'signers={
"name": "david",
"emailAddress": "david@cubeflakes.com",
"privateMessage": "sign",
"authenticationType": "None",
"deliveryMode": "Email",
"signerType": "Signer",
"formFields": [
{
"id": "sign",
"name": "string",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 130,
"y": 130,
"width": 81,
"height": 31
},
"isRequired": true
}
],
"locale": "EN"
}' \
-F 'allowedSignatureTypes=Draw' \
-F 'Files=@{your file}' \
-F 'title=Testing file name'
.NET
var apiClient = new ApiClient("https://api.boldsign.com", "{your API key}");
var documentClient = new DocumentClient(apiClient);
var documentFilePath = new DocumentFilePath
{
ContentType = "application/pdf",
FilePath = "{Your file path}",
};
var filesToUpload = new List<IDocumentFile> { documentFilePath };
var signatureField = new FormField(
id: "sign",
isRequired: true,
type: FieldType.Signature,
pageNumber: 1,
bounds: new Rectangle(x: 130, y: 130, width: 81, height: 31));
var formFieldCollections = new List<FormField> { signatureField };
var signer = new DocumentSigner(
signerName: "david",
signerType: SignerType.Signer,
signerEmail: "david@cubeflakes.com",
formFields: formFieldCollections,
locale: Locales.EN);
signer.DeliveryMode = DeliveryMode.Email;
var documentSigners = new List<DocumentSigner> { signer };
var sendForSign = new SendForSign
{
Message = "please sign this",
Title = "Testing file name",
Signers = documentSigners,
AllowedSignatureTypes = new List<SignatureType> { SignatureType.Draw },
Files = filesToUpload
};
var documentCreated = documentClient.SendDocument(sendForSign);
Python
import boldsign
configuration = boldsign.Configuration(api_key="YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
document_api = boldsign.DocumentApi(api_client)
form_field = boldsign.FormField(
fieldType="Signature",
pageNumber=1,
bounds=boldsign.Rectangle(x=50, y=50, width=200, height=25))
document_signer = boldsign.DocumentSigner(
name="david",
emailAddress="david@cubeflakes.com",
signerType="Signer",
formFields=[form_field])
send_for_sign = boldsign.SendForSign(
title= "Document SDK API",
files=["YOUR_FILE_PATH"],
allowedSignatureTypes =["Draw"],
signers=[document_signer])
document_created = document_api.send_document(send_for_sign)
PHP
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\{FormField, Rectangle, DocumentSigner, SendForSign, FileInfo};
$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
$form_field = new FormField();
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle([100, 100, 100, 50]);
$form_field->setBounds($bounds);
$document_signer = new DocumentSigner();
$document_signer->setName("david");
$document_signer->setEmailAddress("david@cubeflakes.com");
$document_signer->setSignerType("Signer");
$document_signer->setFormFields([$form_field]);
$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->setAllowedSignatureTypes(["Draw"]);
$send_for_sign->setTitle('Document SDK API');
$document_created = $document_api->sendDocument($send_for_sign);
Java
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");
DocumentApi documentApi = new DocumentApi(client);
FormField signatureField = new FormField();
signatureField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
signatureField.setPageNumber(1);
Rectangle bounds = new Rectangle().x(100f).y(100f).width(100f).height(50f);
signatureField.setBounds(bounds);
DocumentSigner signer = new DocumentSigner();
signer.setName("david");
signer.setEmailAddress("david@cubeflakes.com");
signer.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer.setFormFields(Arrays.asList(signatureField));
SendForSign sendForSign = new SendForSign();
File file = new File("YOUR_FILE_PATH");
sendForSign.setFiles(Arrays.asList(file));
sendForSign.setSigners(Arrays.asList(signer));
sendForSign.setAllowedSignatureTypes(Arrays.asList(SendForSign.AllowedSignatureTypesEnum.DRAW));
sendForSign.setTitle("Document SDK API");
DocumentCreated documentCreated = documentApi.sendDocument(sendForSign);
Node Js
import { DocumentApi, DocumentSigner, FormField, Rectangle, SendForSign } from "boldsign";
import * as fs from 'fs';
const documentApi = new DocumentApi();
documentApi.setApiKey("YOUR_API_KEY");
const bounds = new Rectangle();
bounds.x = 100;
bounds.y = 50;
bounds.width = 100;
bounds.height = 100;
const formField = new FormField();
formField.fieldType = FormField.FieldTypeEnum.Signature;
formField.pageNumber = 1;
formField.bounds = bounds;
// Signer
const documentSigner = new DocumentSigner();
documentSigner.name = "david";
documentSigner.emailAddress = "david@cubeflakes.com";
documentSigner.signerType = DocumentSigner.SignerTypeEnum.Signer;
documentSigner.formFields = [formField];
// File
const files = fs.createReadStream("YOUR_FILE_PATH");
// Send for Sign
const sendForSign = new SendForSign();
sendForSign.title = "testing field";
sendForSign.signers = [documentSigner];
sendForSign.allowedSignatureTypes = ["Draw"];
sendForSign.files = [files];
// Send Document
const documentCreated =documentApi.sendDocument(sendForSign)
In the above example, the signer will only see the Draw option when signing the document. You can set the allowedSignatureTypes property based on your preference (e.g., “Draw”, “Text”, “Image”).
Once the request is executed, only the selected signature type(s) will be displayed to signers during the signing process.
In the above screenshot, the signer is presented with the Draw Signature option. Since the allowedSignatureTypes property was set to “Draw”, only this method is available during signing. The signer can hand‑draw their signature using a mouse, trackpad, or touchscreen, and once confirmed, it is securely applied to the document.