How 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 and nameMatcher. 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"
  },
  "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,

};

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 requests # type: ignore
import json

url = "https://api.boldsign.com/v1/document/send"

signer_data = {
    "name": "Test",
    "emailAddress": "[email protected]",
    "signerType": "Signer",
         "authenticationType": "IdVerification",
        "identityVerificationSettings": {
          "type": "EveryAccess",
          "maximumRetryCount": 10,
          "requireLiveCapture": True,
          "requireMatchingSelfie": True,
          "nameMatcher": "Strict"
        },      

    "formFields": [
        {
            "id": "signature1",
            "name": "signature1",
            "fieldType": "Signature",
            "pageNumber": 1,
            "bounds": {
                "x": 50,
                "y": 50,
                "width": 200,
                "height": 25
            },
            "isRequired": True
        }
    ],
    "locale": "EN"
}

payload = {
    'Signers': json.dumps(signer_data),
    'Title': 'Title',
}
files=[
  ('Files',('file',open('{Your file path}','rb'),'application/pdf'))
]

headers = {
  'accept': 'application/json',
  'X-API-KEY': '{Your API Key}'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
 
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.