Setting Up Automatic Reminders for eSignature Requests Using API
Getting documents signed promptly is crucial. BoldSign auto reminders serve as polite notifications for signers to sign a document, reducing delays and ensuring documents are completed on time.
You can configure automatic reminders for your document through the BoldSign API. By adding a ReminderSettings object to your API call and setting EnableAutoReminder to true, you can specify the frequency of reminders after the initial reminder and set the total number of reminders to be sent.
Settings for automatic reminders can only be changed while creating a document and cannot be changed after the document has been sent. If a document expires, automatic reminders will not be sent. Reminders are sent automatically at specified intervals and a specified number of times until the document is signed.
Code snippets
Let’s explore how to add auto reminders in various programming languages:
Curl
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 'ReminderSettings.ReminderDays={set days after which reminder should be sent}' \
-F 'ReminderSettings.ReminderCount={set the number of reminders to be sent}' \
-F 'Message={document message}' \
-F 'Signers={
"name": "alexgayle",
"emailAddress": "alexgayle@boldsign.dev",
"signerType": "Signer",
"formFields": [
{
"id": "textbox1",
"name": "textbox1",
"filetype": "Textbox",
"pageNumber": 1,
"bounds": {
"x": 140,
"y": 140,
"width": 82,
"height": 32
},
"isRequired": true
}
]
}' \
-F 'Files=@{your file}' \
-F 'Title={title}' \
-F 'ReminderSettings.EnableAutoReminder=true' \
C#
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: 200, y: 200, width: 125, height: 25));
var formFieldCollections = new List<FormField>()
{
signatureField
};
var signer = new DocumentSigner(
signerName: "David",
signerEmail: "starvritsabuhungi@boldsign.dev",
signerType: SignerType.Signer,
formFields: formFieldCollections,
locale: Locales.EN);
var documentSigners = new List<DocumentSigner>()
{
signer
};
var sendForSign = new SendForSign()
{
Signers = documentSigners,
Title = "Auto Reminder",
ReminderSettings = new ReminderSettings()
{
EnableAutoReminder = true,
ReminderCount = 3,
ReminderDays = 4
},
Files = filesToUpload
};
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated.DocumentId);
Python
import requests # type: ignore.
import json.
url = "https://api.boldsign.com/v1/document/send"
signer_data = {
"name": "starvritsa",
"emailAddress": "starvritsabuhungi@boldsign.dev",
"signerType": "Signer",
"signerRole": "Signer",
"formFields": [
{
"id": "signature",
"name": "signature",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 100,
"y": 100,
"width": 125,
"height": 25
},
"isRequired": True,
}
],
"locale": "EN"
}
payload = {
'Signers': json.dumps(signer_data),
'Title': "Auto reminder",
'ReminderSettings.EnableAutoReminder': 'true',
'ReminderSettings.ReminderDays': '4',
'ReminderSettings.ReminderCount': '3',
}
files = [
('Files', ('{your file name}, open('{your file path}', 'rb'), 'application/pdf'))
]
headers = {
'accept': 'application/json',
'X-API-KEY': '{your Api key}'
}
response = requests.post(url, headers=headers, data=payload, files=files)
print(response.text)
Node.js
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
let data = new FormData();
data.append('Signers', '{\r\n "name": "starvritsa",\r\n "emailAddress": "starvritsabuhungi@boldsign.dev",\r\n "signerType": "Signer", \r\n "signerRole": "Signer",\r\n "formFields": [\r\n {\r\n "id": "signature",\r\n "name": "signature",\r\n "fieldType": "Signature",\r\n "pageNumber": 1,\r\n "bounds": {\r\n "x": 100,\r\n "y": 100,\r\n "width": 125,\r\n "height": 25\r\n },\r\n "isRequired": true\r\n }\r\n ],\r\n "locale": "EN"\r\n}');
data.append('Files', fs.createReadStream('{your file path}'));
data.append('Title', 'Node JS reminder');
data.append('ReminderSettings.EnableAutoReminder', 'true');
data.append('ReminderSettings.ReminderDays', '4');
data.append('ReminderSettings.ReminderCount', '3');
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);
});
PHP
<?php
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use \GuzzleHttp\Psr7\Utils;
$client = new GuzzleHttp\Client([ 'verify' => false, ]);
$headers = [
'accept' => 'application/json',
'X-API-KEY' => '{your api key}'
];
$options = [
'multipart' => [
[
'name' => 'ReminderSettings.ReminderDays',
'contents' => '5'
],
[
'name' => 'ReminderSettings.ReminderCount',
'contents' => '3'
],
[
'name' => 'Message',
'contents' => 'please sign the document'
],
[
'name' => 'Signers',
'contents' => '{
"name": "starvritsa",
"emailAddress": "starvritsabuhungi@boldsign.dev",
"signerType": "Signer",
"formFields": [
{
"id": "string",
"name": "string",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 50,
"y": 50,
"width": 1,
"height": 1
},
"isRequired": true
}
],
"locale": "EN"
}'
],
[
'name' => 'Files',
'contents' => Utils::tryFopen('{your file path}', 'r'),
'filename' => '{your file name}',
'headers' => [
'Content-Type' => 'application/pdf'
]
],
[
'name' => 'Title',
'contents' => 'Autoreminder'
],
[
'name' => 'ReminderSettings.EnableAutoReminder',
'contents' => 'true'
]
]];
$request = new Request('POST', 'https://api.boldsign.com/v1/document/send', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
Conclusion
Incorporating reminders into document workflows is a strategic move toward ensuring efficiency, compliance, and security. Organizations can enhance productivity, reduce wait times, and retain control over documents by utilizing BoldSign’s API.
Start your 30-day BoldSign free trial today to simplify getting your documents signed digitally. We value your feedback, so please share your thoughts in the comments 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.
Originally published at https://boldsign.com/on May 24, 2024.