BoldSign AI Assistant
Chat with the BoldSign AI AssistantHow to Send Private Message to Signer Easily
BoldSign supports sending private messages to signers when sending a document via API. This feature is particularly useful when you need to provide specific instructions or information to individual signers. The sender can send a private message to each recipient when sending a document.
Below are example codes for sending a private message to a signer:
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 'Title="Invitation form"' \
-F 'Signers={
"name": "hanky",
"emailAddress": "[email protected]",
"privateMessage": "This is private message for signer",
"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"
}' \
-F 'Signers={
"name": "Cilian",
"emailAddress": "[email protected]",
"signerType": "Signer",
"signerRole": "Signer",
"formFields": [
{
"id": "Signature1",
"name": "Signature",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 100,
"y": 150,
"width": 125,
"height": 25
},
"isRequired": true
}
],
"locale": "EN"
}' \
-F 'Files=@{your file}' \
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: "Signature",
isRequired: true,
type: FieldType.Signature,
pageNumber: 1,
bounds: new Rectangle(x: 100, y: 100, width: 125, height: 25));
var signatureField1 = new FormField(
id: "Signature1",
isRequired: true,
type: FieldType.Signature,
pageNumber: 1,
bounds: new Rectangle(x: 100, y: 150, width: 125, height: 25));
var formFieldCollections = new List<FormField>()
{
signatureField
};
var formFieldCollections1 = new List<FormField>()
{
signatureField1
};
var signer = new DocumentSigner(
signerName: "Hanky",
signerType: SignerType.Signer,
signerEmail: "[email protected]",
privateMessage: "This is private message for signer",
formFields: formFieldCollections,
locale: Locales.EN);
var signer1 = new DocumentSigner(
signerName: "Cilian",
signerType: SignerType.Signer,
signerEmail: "[email protected]",
formFields: formFieldCollections1,
locale: Locales.EN);
var documentSigners = new List<DocumentSigner>()
{
signer,
signer1
};
var sendForSign = new SendForSign()
{
Title = "Sample Document",
HideDocumentId = false,
Signers = documentSigners,
Files = filesToUpload,
};
var documentCreated = documentClient.SendDocument(sendForSign);
import boldsign
configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key = "YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
document_api = boldsign.DocumentApi(api_client)
send_for_sign = boldsign.SendForSign(
title = "Document SDK API",
document_title = "SDK Document Test case",
description = "Testing document from SDK integration test case",
files = ["YOUR_FILE_PATH"],
signers = [
boldsign.DocumentSigner(
name = "Hanky",
emailAddress = "[email protected]",
signerOrder = 1,
signerType = "Signer",
formFields = [
boldsign.FormField(
name = "Sign",
fieldType = "Signature",
font = "Helvetica",
pageNumber = 1,
isRequired = True,
bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
)
],
privateMessage = "This is private message for signer"
),
boldsign.DocumentSigner(
name = "Cilian",
emailAddress = "[email protected]",
signerOrder = 1,
signerType = "Signer",
formFields = [
boldsign.FormField(
name = "Sign",
fieldType = "Signature",
font = "Helvetica",
pageNumber = 1,
isRequired = True,
bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
),
],
)
]
)
document_created = document_api.send_document(send_for_sign)
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\TemplateApi;
$config = new Configuration();
$config->setHost("https://api.boldsign.com");
$config->setApiKey('YOUR_API_KEY');
$templateApi = new TemplateApi($config);
$formField = new BoldSign\Model\FormField();
$formField->setFieldType('Signature');
$formField->setPageNumber(1);
$bounds = new BoldSign\Model\Rectangle();
$bounds->setX(100);
$bounds->setY(100);
$bounds->setWidth(100);
$bounds->setHeight(50);
$formField->setBounds($bounds);
$role = new BoldSign\Model\Role();
$role->setRoleIndex(1);
$role->setSignerName('David');
$role->setSignerEmail('[email protected]');
$role->setFormFields([$formField]);
$role->setPrivateMessage("This is private message for signer");
$sendForSignFromTemplateForm = new BoldSign\Model\SendForSignFromTemplateForm();
$sendForSignFromTemplateForm->setRoles([$role]);
$sendForSignFromTemplateForm->setDisableEmails(true);
$result = $templateApi->sendUsingTemplate('YOUR_TEMPLATE_ID', $sendForSignFromTemplateForm);
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
TemplateApi templateApi = new TemplateApi(client);
Rectangle bounds = new Rectangle().x(100f).y(100f).width(100f).height(50f);
FormField formField = new FormField();
formField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
formField.setPageNumber(1);
formField.setBounds(bounds);
Role role = new Role();
role.setRoleIndex(1);
role.setSignerName("David");
role.setSignerEmail("[email protected]");
role.setFormFields(Arrays.asList(formField));
role.setPrivateMessage("This is private message for signer");
SendForSignFromTemplateForm sendForSignFromTemplateForm = new SendForSignFromTemplateForm();
sendForSignFromTemplateForm.setRoles(Arrays.asList(role));
sendForSignFromTemplateForm.setDisableEmails(true);
DocumentCreated documentCreated = templateApi.sendUsingTemplate("YOUR_TEMPLATE_ID", sendForSignFromTemplateForm);
import * as boldsign from "boldsign";
const templateApi = new boldsign.TemplateApi("https://api.boldsign.com");
templateApi.setApiKey("YOUR_API_KEY");
const formField = new boldsign.FormField();
formField.fieldType = boldsign.FormField.FieldTypeEnum.Signature;
formField.pageNumber = 1;
formField.bounds = new boldsign.Rectangle();
formField.bounds.x = 100;
formField.bounds.y = 100;
formField.bounds.width = 100;
formField.bounds.height = 50;
const role = new boldsign.Role();
role.roleIndex = 1;
role.signerName = "David";
role.signerEmail = "[email protected]";
role.formFields = [formField];
role.privateMessage = "This is private message for signer";
const sendForSignFromTemplateForm = new boldsign.SendForSignFromTemplateForm();
sendForSignFromTemplateForm.roles = [role];
sendForSignFromTemplateForm.disableEmails = true;
const documentCreated = templateApi.sendUsingTemplate("YOUR_TEMPLATE_ID", sendForSignFromTemplateForm);
In the example above, set the privateMessage property with the desired message you want to send to each signer. By executing any of the provided code examples, the document will be sent for signature, and each signer will receive the specified private message intended for them.