How to add email authentication for the signer after sending the document?

BoldSign enables you to add email authentication for signers, even after a document has already been sent for signature.

To authenticate signers via email using the BoldSign API, set the AuthenticationType to EmailOTP and provide the document ID where the recipient is added. When the recipient attempts to sign the document, they will be required to enter a valid code that will be sent to their email address before they can access the document.

Please be aware that if the signer fails the authentication process three times, the document will be locked for security reasons.

Below are sample code snippets that demonstrate how to add email authentication for one of a document's recipients:

Code snippet


curl -X PATCH "https://api.boldsign.com/v1/document/addAuthentication?documentId={documentId}"
      -H 'X-API-KEY: {your API key}'
      -H "Content-Type: application/json"
      -d "{\"authenticationType\": \"EmailOTP\", \"emailId\": \"alexgayle@cubeflakes.com\"}"

using BoldSign.Api;
using BoldSign.Model;

var apiClient = new ApiClient("https://api.boldsign.com", "{apikey}");
var documentclient = new DocumentClient(apiClient);
await documentclient.AddAuthenticationAsync("{documentId}", "alexgayle@cubeflakes.com", AuthenticationType.EmailOTP).ConfigureAwait(false);
import requests
import json
url = "https://api.boldsign.com/v1/document/addAuthentication?documentId={documentId}"
payload = json.dumps({
  "authenticationType": "EmailOTP",
  "emailId": "alexgayle@cubeflakes.com"
})
headers = {
  'X-API-KEY': '{your API key}',
  'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)

const axios = require('axios');
await axios.patch(
'https://api.boldsign.com/v1/document/addAuthentication',
    {
    authenticationType: 'EmailOTP',
        emailId: 'alexgayle@cubeflakes.com'
    },

    {
        params: { documentId: '{documentId}' },
        headers: {
          'X-API-KEY': '{Your API key}',
          'Content-Type': 'application/json'
        }
    }
);

<?php
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

$client = new Client(['verify' => false]);
$headers = [
  'X-API-KEY' => '{your API key}',
  'Content-Type' => 'application/json'
];
$body = '{
  "authenticationType": "EmailOTP",
  "emailId": "alexgayle@cubeflakes.com"
}';
$request = new Request('PATCH', 'https://api.boldsign.com/v1/document/addAuthentication?documentId={documentId}', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

In the code examples provided, please ensure that you update the authenticationType to EmailOTP. Additionally, replace the placeholder documentId with the actual ID of the document you created, and update SignerEmail with the appropriate signer's email address.

Once the code is executed, the document will be secured using Email OTP authentication. This means the signer will only be able to access the document by entering the correct OTP sent to their email.