Send document to multiple recipients
Sending a single document to multiple recipients can be essential when you need to share the same document with various individuals. BoldSign simplifies this process by enabling you to include multiple recipients all at once.
Send a document to multiple recipients
To send a document to multiple recipients using the BoldSign API, you can follow these steps
Utilize the provided codes as an example to construct your request. The following code snippets demonstrate how to send a document with multiple signers via the API.
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 'Message=' \ -F 'Signers= { "name": "Hanky", "emailAddress": "hankyWhites@cubeflakes.com", "signerType": "Signer", "formFields": [ { "id": "string", "name": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 50, "y": 50, "width": 1, "height": 1 }, "isRequired": true } ], "locale": "EN" }' -F 'Signers= { "name": "Cilian", "emailAddress": "cilianmurphy@cubeflakes.com", "signerType": "Signer", "formFields": [ { "id": "sign_1", "name": "sign_1", "fieldType": "Signature", "pageNumber": 2, "bounds": { "x": 50, "y": 50, "width": 1, "height": 1 }, "isRequired": true } ], "locale": "EN" }' \ -F 'Files={your file}' \ -F 'Title={title}' \
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: 100, y: 100, width: 100, height: 50)); var signatureField1 = new FormField( id: "sign_1", isRequired: true, type: FieldType.Signature, pageNumber: 1, bounds: new Rectangle(x: 100, y: 100, width: 100, height: 50)); var formFieldCollections = new List<FormField>() { signatureField }; var formFieldCollections1 = new List<FormField>() { signatureField1 }; var signer = new DocumentSigner( signerName: "David", signerType: SignerType.Signer, signerEmail: "david@cubeflakes.com", formFields: formFieldCollections, locale: Locales.EN); var signer1 = new DocumentSigner( signerName: "Cilian", signerType: SignerType.Signer, signerEmail: "cilianmurphy@cubeflakes.com", formFields: formFieldCollections1, locale: Locales.EN); var documentSigners = new List<DocumentSigner>() { signer, signer1 }; var sendForSign = new SendForSign() { Message = "please sign this", Title = "Agreement", Signers = documentSigners, Files = filesToUpload }; var documentCreated = documentClient.SendDocument(sendForSign); Console.WriteLine(documentCreated.DocumentId);
import requests import json url = "https://api.boldsign.com/v1/document/send" signer_1 = { "name": "Hanky", "emailAddress": "hankyWhites@cubeflakes.com", "signerType": "Signer", "formFields": [ { "id": "string", "name": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 50, "y": 50, "width": 1, "height": 1 }, "isRequired": True } ], "locale": "EN" } signer_2 = { "name": "Cilian", "emailAddress": "cilianmurphy@cubeflakes.com", "signerType": "Signer", "formFields": [ { "id": "sign_1", "name": "sign_1", "fieldType": "Signature", "pageNumber": 2, "bounds": { "x": 50, "y": 50, "width": 1, "height": 1 }, "isRequired": True } ], "locale": "EN" } payload = { 'Message': '', 'Signers': [json.dumps(signer_1), json.dumps(signer_2)], 'Title': '{title}' } 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)
const axios = require('axios'); const FormData = require('form-data'); const fs = require('fs'); let data = new FormData(); data.append('Message', ''); data.append('Signers', '{\r\n "name": "Hanky",\r\n "emailAddress": "hankyWhites@cubeflakes.com",\r\n "signerType": "Signer",\r\n "formFields": [\r\n {\r\n "id": "string",\r\n "name": "string",\r\n "fieldType": "Signature",\r\n "pageNumber": 1,\r\n "bounds": {\r\n "x": 50,\r\n "y": 50,\r\n "width": 1,\r\n "height": 1\r\n },\r\n "isRequired": true\r\n }\r\n ],\r\n "locale": "EN"\r\n}'); data.append('Signers', '\r\n {\r\n "name": "Cilian",\r\n "emailAddress": "cilianmurphy@cubeflakes.com",\r\n "signerType": "Signer",\r\n "formFields": \r\n [\r\n {\r\n "id": "sign_1",\r\n "name": "sign_1",\r\n "fieldType": "Signature",\r\n "pageNumber": 2,\r\n "bounds": {\r\n "x": 50,\r\n "y": 50,\r\n "width": 1,\r\n "height": 1\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', '{title}'); 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); });
Replace placeholders (Title
, Message
, etc.) within the snippet with your specific inputs. Adjust values in the Signers
array to match your custom recipients.
Executing this code will send the document to the specified recipients as provided in the snippet.