BoldSign AI Assistant
Chat with the BoldSign AI AssistantSend Documents with Multiple CC Recipients
The CC option is used to send a copy of the document to non-signers. The recipient added in CC will receive notifications when a signer performs any action on the document. The CC recipients can view and download the document, but they cannot sign it.
This article provides step-by-step guidance on how to set multiple CCs (Carbon Copies) for signers in documents using the BoldSign API.
Here are code examples you can use to set multiple CCs for 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 'CC={
"emailAddress": "[email protected]",
"emailAddress": "[email protected]",
"emailAddress": "[email protected]",
"emailAddress": "[email protected]"
}' \
-F 'Signers={
"name": "David",
"emailAddress": "[email protected]",
"formFields": [
{
"id": "Sign",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 50,
"y": 100,
"width": 100,
"height": 60
},
"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: 600, width: 125, height: 25))
var formFieldCollections = new List<FormField>()
{
signatureField
};
var signer = new DocumentSigner(
signerName: "David",
signerEmail: "[email protected]",
formFields: formFieldCollections,
locale: Locales.EN);
var documentSigners = new List<DocumentSigner>()
{
signer
};
var sendForSign = new SendForSign()
{
Signers = documentSigners,
CC = new List<DocumentCC>()
{
new DocumentCC(emailAddress: "[email protected]"),
new DocumentCC(emailAddress: "[email protected]"),
new DocumentCC(emailAddress: "[email protected]"),
new DocumentCC(emailAddress: "[email protected]"),
},
Title = "Sample Document",
Files = filesToUpload
};
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated.DocumentId);
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 = "Signature",
fieldType = "Signature",
font = "TimesRoman",
pageNumber = 1,
isRequired = True,
bounds = boldsign.Rectangle(x = 100, y = 100, width = 125, height = 100)
)
],
privateMessage = "This is private message for signer"
)
],
cc = [
boldsign.DocumentCC(
emailAddress = "[email protected]"
),
boldsign.DocumentCC(
emailAddress = "[email protected]"
),
boldsign.DocumentCC(
emailAddress = "[email protected]"
)
]
)
document_created = document_api.send_document(send_for_sign)
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\{Rectangle, FormField, DocumentSigner, DocumentCC, SendForSign};
$config = new Configuration();
$config->setHost("https://api.boldsign.com");
$config->setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
$form_field = new FormField();
$form_field->setName('Sign');
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle(['x' => 50, 'y' => 50, 'width' => 100, 'height' => 150]);
$form_field->setBounds($bounds);
$form_field->setIsRequired(true);
$signer = new DocumentSigner();
$signer->setName('David');
$signer->setEmailAddress('[email protected]');
$signer->setFormFields([$form_field]);
$signer->setLocale('EN');
$cc1 = new DocumentCC();
$cc1->setEmailAddress('[email protected]');
$cc2 = new DocumentCC();
$cc2->setEmailAddress('[email protected]');
$cc3 = new DocumentCC();
$cc3->setEmailAddress('[email protected]');
$cc4 = new DocumentCC();
$cc4->setEmailAddress('[email protected]');
$send_for_sign = new SendForSign();
$send_for_sign->setTitle('Sample Document');
$send_for_sign->setFiles(['pdffile.pdf']);
$send_for_sign->setSigners([$signer]);
$send_for_sign->setCc([$cc1, $cc2, $cc3, $cc4]);
$document_created = $document_api->sendDocument($send_for_sign);
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import com.boldsign.ApiClient;
import com.boldsign.ApiException;
import com.boldsign.Configuration;
import com.boldsign.api.DocumentApi;
import com.boldsign.model.DocumentCC;
import com.boldsign.model.DocumentCreated;
import com.boldsign.model.DocumentSigner;
import com.boldsign.model.FormField;
import com.boldsign.model.Rectangle;
import com.boldsign.model.SendForSign;
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://staging-api.boldsign.com");
client.setApiKey("MWE2ZjBiYWEtNDlkNS00ZjBkLWI4Y2ItZWQwMTMxOWM4NzYx");
DocumentApi documentApi = new DocumentApi(client);
FormField signatureField = new FormField();
signatureField.setId("Sign");
signatureField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
signatureField.setPageNumber(1);
signatureField.setIsRequired(true);
Rectangle bounds = new Rectangle().x(50f).y(100f).width(100f).height(60f);
signatureField.setBounds(bounds);
DocumentSigner signer = new DocumentSigner();
signer.setName("David");
signer.setEmailAddress("[email protected]");
signer.setFormFields(Arrays.asList(signatureField));
signer.setLocale(DocumentSigner.LocaleEnum.EN);
DocumentCC cc1 = new DocumentCC();
cc1.setEmailAddress("[email protected]");
DocumentCC cc2 = new DocumentCC();
cc2.setEmailAddress("[email protected]");
DocumentCC cc3 = new DocumentCC();
cc3.setEmailAddress("[email protected]");
DocumentCC cc4 = new DocumentCC();
cc4.setEmailAddress("[email protected]");
ArrayList<DocumentCC> ccList = new ArrayList<>();
ccList.add(cc1);
ccList.add(cc2);
ccList.add(cc3);
ccList.add(cc4);
SendForSign sendForSign = new SendForSign();
sendForSign.setTitle("Sample Document");
sendForSign.setFiles(Arrays.asList(new File("nda-document.pdf")));
sendForSign.setSigners(Arrays.asList(signer));
sendForSign.setCc(ccList);
DocumentCreated documentCreated = documentApi.sendDocument(sendForSign);
import { DocumentApi, DocumentSigner, FormField, Rectangle, SendForSign, DocumentCC } from "boldsign";
import * as fs from 'fs';
const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey("YOUR_API_KEY");
const signatureField = new FormField();
signatureField.id = "Sign";
signatureField.fieldType = FormField.FieldTypeEnum.Signature;
signatureField.pageNumber = 1;
signatureField.isRequired = true;
signatureField.bounds = new Rectangle();
signatureField.bounds.x = 50;
signatureField.bounds.y = 100;
signatureField.bounds.width = 100;
signatureField.bounds.height = 60;
const signer = new DocumentSigner();
signer.name = "David";
signer.emailAddress = "[email protected]";
signer.formFields = [signatureField];
signer.locale = DocumentSigner.LocaleEnum.En;
const cc1 = new DocumentCC();
cc1.emailAddress = "[email protected]";
const cc2 = new DocumentCC();
cc2.emailAddress = "[email protected]";
const cc3 = new DocumentCC();
cc3.emailAddress = "[email protected]";
const cc4 = new DocumentCC();
cc4.emailAddress = "[email protected]";
const sendForSign = new SendForSign();
sendForSign.title = "Sample Document";
sendForSign.files = [fs.createReadStream("YOUR_FILE_PATH")];
sendForSign.signers = [signer];
sendForSign.cc = [cc1, cc2, cc3, cc4];
const documentCreated = documentApi.sendDocument(sendForSign);
In the above examples, update CC with the email addresses of the CCs. After executing the above code, the document will be created, and notifications will be sent to the CC email addresses.