Change the Recipient of a Document

In the event that you've sent a document to an incorrect signer and the document remains unsigned, there's no need to worry. BoldSign provides a straightforward option to change the recipient. This guide outlines the steps to effectively modify the recipient of a document.

Please note that the recipient of a document cannot be changed if any of the signers have already completed the signing process for the document.

BoldSign provides an API that allows you to programmatically change the recipient of a document. The following are the code examples in different programming languages to assist you in achieving this task:

Code snippet

curl -X 'PATCH' \ 'https://api.boldsign.com/v1/document/changeRecipient?documentId={Your document Id}' \
     -H 'X-API-KEY: {your API key}' \
     -H 'Content-Type: application/json' \
     -d '{
  "newSignerName": "{New signer name}",
  "reason": "{Reason to change signer}",
  "newSignerEmail": "{Old signer email}",
  "oldSignerEmail": "{New signer email}"
}'      

var apiClient = new ApiClient("https://api.boldsign.com", "{your API key}");
var documentClient = new DocumentClient(apiClient);

documentClient.ChangeRecipient("{Your document Id}",
      "{Old signer email}", "{Reason to change signer}", "{New signer name}", "{New signer email}");
import requests
import json

url = "https://api.boldsign.com/v1/document/changeRecipient?documentId={Your document Id}"

payload = json.dumps({
  "newSignerName": "{New signer name}",
  "reason": "{Reason to change signer}",
  "newSignerEmail": "{New signer email}",
  "oldSignerEmail": "{Old signer email}"
})
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');
let data = JSON.stringify({
  "newSignerName": "{New signer name}",
  "reason": "{Reason to change signer}",
  "newSignerEmail": "{New signer email}",
  "oldSignerEmail": "{Old signer email}"
});

let config = {
  method: 'patch',
  maxBodyLength: Infinity,
  url: 'https://api.boldsign.com/v1/document/changeRecipient?documentId={Your document Id}',
  headers: { 
    'X-API-KEY': '{your API key}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

In the above example, replace the documentId with the ID of the document you created earlier. Then, update the newSignerName, newSignerEmail, oldSignerEmail, and reason properties with the appropriate values.

By using these code snippets, the recipient of the document will be updated, and an email will be sent to the new signer containing the signing link for the document.