BoldSign AI Assistant
Chat with the BoldSign AI AssistantHow to send a document with identity verification using BoldSign API?
Identity verification is a signer authentication method in BoldSign that enhances document security. This feature allows senders to confirm that signers have authenticated their identity before they can access and sign a document, adding an extra level of trust and safety to the process. Refer to this for more details: Identity Verification
Sending a document to the signer with Identity Verification authentication
To add Id Verification authentication to signature requests, you need to include AuthenticationType as IdVerification. You can configure IdVerifictionSettings such as type, maximumretryCount, requireLiveCapture, requireMatchingSelfie, nameMatcher and allowedDocumentTypes. Refer to this for more details: Identity verification settings in BoldSign
Here are example codes you can use to send document with Id verification:
Code snippet
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 'Files=@{Your file name};type=application/pdf' \
-F 'Title={Title}' \
-F 'Signers={
"name": "Test",
"emailAddress": "[email protected]",
"authenticationType": "IdVerification",
"deliveryMode": "Email",
"identityVerificationSettings": {
"type": "EveryAccess",
"maximumRetryCount": 10,
"requireLiveCapture": true,
"requireMatchingSelfie": true,
"nameMatcher": "Strict",
"allowedDocumentTypes": [
"Passport",
"IDCard",
"DriverLicense"
]
},
"signerType": "Signer",
"allowFieldConfiguration": true,
"formFields": [
{
"id": "signature1",
"name": "signature1",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 160,
"y": 150,
"width": 51,
"height": 21
},
"isRequired": true
}
]
}'
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: 100, y: 100, width: 100, height: 50));
var formFieldCollections = new List<FormField>()
{
signatureField
};
var idSettings = new IdentityVerificationSettings
{
Type = Model.IdVerification.IdVerificationType.EveryAccess,
MaximumRetryCount = 10,
RequireLiveCapture = true,
RequireMatchingSelfie = true,
NameMatcher = Model.IdVerification.NameVariation.Strict,
AllowedDocumentTypes = new List<Model.IdVerification.AllowedDocumentType>()
{
Model.IdVerification.AllowedDocumentType.Passport,
Model.IdVerification.AllowedDocumentType.IDCard,
Model.IdVerification.AllowedDocumentType.DriverLicense,
},
};
var signer = new DocumentSigner(
signerName: "Signer Name",
signerType: SignerType.Signer,
signerEmail: "[email protected]",
authenticationType: AuthenticationType.IdVerification,
identityVerificationSettings: idSettings,
formFields: formFieldCollections,
locale: Locales.EN);
var documentSigners = new List<DocumentSigner>()
{
signer
};
var sendForSign = new SendForSign()
{
Title = "Agreement",
Signers = documentSigners,
Files = filesToUpload,
};
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated.DocumentId);
import boldsign
configuration = boldsign.Configuration(api_key = "YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
document_api = boldsign.DocumentApi(api_client)
send_for_sign = boldsign.SendForSign(
title = "Document SDK API",
document_title = "SDK Document Test case",
description = "Testing document from SDK integration test case",
files = ["YOUR_FILE_PATH"],
signers = [
boldsign.DocumentSigner(
name = "Hanky",
emailAddress = "[email protected]",
signerOrder = 1,
signerType = "Signer",
formFields = [
boldsign.FormField(
name = "Sign",
fieldType = "Signature",
font = "Helvetica",
pageNumber = 1,
isRequired = True,
bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
)
],
privateMessage = "This is private message for signer",
authenticationType = "IdVerification",
identityVerificationSettings = boldsign.IdentityVerificationSettings(
type = "EveryAccess",
maximumRetryCount = 10,
requireLiveCapture = True,
requireMatchingSelfie = True,
nameMatcher = "Strict"
)
)
],
)
document_created = document_api.send_document(send_for_sign)
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
let data = new FormData();
const signerData = {
name: 'Name',
emailAddress: '[email protected],
signerType: 'Signer',
signerRole: 'Signer',
authenticationType: 'IdVerification',
"identityVerificationSettings": {
"type": "EveryAccess",
"maximumRetryCount": 10,
"requireLiveCapture": true,
"requireMatchingSelfie": true,
"nameMatcher": "Strict"
},
formFields: [
{
id: 'signature',
name: 'signature',
fieldType: 'Signature',
pageNumber: 1,
bounds: {
x: 160,
y: 100,
width: 100,
height: 100
},
isRequired: true
}
],
locale: 'EN'
};
data.append('Signers', JSON.stringify(signerData));
data.append('Files', fs.createReadStream('{Your file path}'));
data.append('Title', '{title}');
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.boldsign.com/v1/document/send',
headers: {
accept: 'application/json',
'X-API-KEY': '{Your API Key}',
...data.getHeaders()
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Replace the values (Files, Signers, etc.) with the actual values. Set the value for authenticationType as IdVerification, and provide values for Identity verification settings with the values you want to send with it.
Upon execution, the document will be created with Identity Verification and signers will be requested to identify themselves with designated documents before they can access the document.