The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

Request Demo
BoldSign Logo Small

Features

Explore the BoldSign features that make eSigning easier.

How to change recipient of a document via API

How to Change the Recipient of an eSignature Document via API

Sending a document to the wrong signer can be stressful. BoldSign provides a straightforward option to change the recipient if the signer has yet to sign. This guide outlines the steps to do that.

Editing the recipient via BoldSign API

BoldSign provides an API that allows you to programmatically change the recipient of a document by providing the following details:

  • Document ID
  • New signer details
  • Old signer email
  • Reason for changing the signer

The recipients of the document cannot be changed if the signing process is in any one of the following states:

  • Signed
  • Declined
  • Revoked
  • Expired

If the document had two or more recipients and either of the recipients has signed, you can still edit the recipients that have yet to sign the document. The old recipient will receive an email notification regarding the changes made.

Code snippets

The following are the code examples in different programming languages to assist you in achieving this task.

Curl

    
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}"
}'           

C#

    
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}");

Python

    
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'
}

Node.js

    
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);
});

PHP

    
<?php
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$documentId = '{Your document Id}';
$apiKey = '{your API key}';
$newSignerName = '{New signer name}';
$reason = '{Reason to change signer}';
$newSignerEmail = '{New signer email}';
$oldSignerEmail = '{Old signer email}';

$client = new Client();
$headers = [
    'accept' => 'application/json',
    'X-API-KEY' => $apiKey,
    'Content-Type' => 'application/json'
];

Conclusion

Fixing errors when you send documents for signature doesn’t need to be difficult. Using BoldSign’s API, you can easily change the recipient of an unsigned document, making sure it gets to the right person. Start your 30-day free BoldSign trial today and see how easy is to change your document recipients for yourself.

We value your feedback, so please share your thoughts below. If you have any questions or need more information about our services, don’t hesitate to schedule a demo or reach out to our support team through our support portal.

Picture of Starvritsa Buhungi

Starvritsa Buhungi

Starvritsa is a Technical Assistant at BoldSign, channelling her passion into crafting top-tier content for users through meticulous documentation. She creates content across various formats, including API tutorials, help articles, and comprehensive guides.

Share this blog

Picture of Starvritsa Buhungi

Starvritsa Buhungi

Starvritsa is a Technical Assistant at BoldSign, channelling her passion into crafting top-tier content for users through meticulous documentation. She creates content across various formats, including API tutorials, help articles, and comprehensive guides.

Subscribe RSS feed

Leave a Reply

Your email address will not be published. Required fields are marked *