How to configure recipient notifications in BoldSign using API requests?
When sending a document using the BoldSign API, you can control the notifications that recipients receive through the recipientNotificationSettings
property for each signer. This article provides guidance on how to customize recipient notifications by updating the recipientNotificationSettings
property in your API requests. If this property is not provided, the default notification settings configured in your business profile will apply.
Following are the notifications available in recipientNotificationSettings.
SignatureRequest | Indicates whether the recipient or CC should be notified when a document is sent. |
Declined | Indicates whether the recipient or CC should be notified when a document is declined. |
Revoked | Indicates whether the recipient or CC should be notified when a document is revoked. |
Signed | Indicates whether the recipient or CC should be notified when a document is signed by other recipient. |
Completed | Indicates whether the recipient or CC should be notified when the document is completed. |
Expired | Indicates whether the recipient or CC should be notified when a document expires. |
Reassigned | Indicates whether the recipient or CC should be notified when the document is reassigned. |
Deleted | Indicates whether the recipient or CC should be notified when a document is deleted. |
Reminders | Indicates whether the recipient should receive reminders for pending signature requests. |
EditRecipient | Indicates whether the recipient should be notified when there is a change in the recipient. |
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: application/json' \ -d '{ "Signers": [ { "name": "Alex", "emailAddress": "alexgayle@boldsign.dev", "signerType": "Signer", "formFields": [ { "id": "string", "name": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 50, "y": 50, "width": 125, "height": 25 }, "isRequired": true } ], "recipientNotificationSettings": { "signatureRequest": true, "declined": true, "revoked": true, "signed": true, "completed": true, "expired": true, "reassigned": true, "deleted": true, "reminders": true, "editRecipient": true } } ], "Files": [ "data:application/pdf;base64,JVBERi0xLjcKJcfs..." ], "Title": "Sampledocument", }'
var apiClient = new ApiClient("https://api.boldsign.com", "{your API key}"); var documentClient = new DocumentClient(apiClient); var documentFilePath = new DocumentFilePath { ContentType = "application/pdf", FilePath = "agreement.pdf", }; 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 formFieldCollections = new List<FormField>() { signatureField, }; var signer = new DocumentSigner( signerName: "David", signerType: SignerType.Signer, signerEmail: "david@cubeflakes.com", formFields: formFieldCollections); signer.RecipientNotificationSettings = new RecipientNotificationSettings() { SignatureRequest = true, Declined = true, Revoked = true, Signed= true, Completed= true, Expired = true, Reassigned = true, Deleted = true, Reminders = true, EditRecipient = true }; var documentSigners = new List<DocumentSigner>() { signer }; var sendForSign = new SendForSign() { Title = "Agreement", Signers = documentSigners, Files = filesToUpload, }; var documentCreated = documentClient.SendDocument(sendForSign);
import requests import json url = "https://api.boldsign.com/v1/document/send" signer_data = { "name": "David", "emailAddress": "david@boldsign.dev", "signerType": "Signer", "formFields": [ { "id": "string", "name": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 50, "y": 50, "width": 200, "height": 25 }, "isRequired": True } ], "recipientNotificationSettings": { "signatureRequest": true, "declined": true, "revoked": true, "signed": true, "completed": true, "expired": true, "reassigned": true, "deleted": true, "reminders": true, "editRecipient": true } } payload = { 'Signers': [signer_data], 'Title': 'Agreement', 'Files': [ 'data:application/pdf;base64,JVBERi0xLjcKJcfs...' ], } headers = { 'Content-Type': 'application/json', 'accept': 'application/json', 'X-API-KEY': '{your API key}' } response = requests.post(url, headers=headers, json=payload) print(response.text)
const axios = require('axios'); const fs = require('fs'); // Create the payload object const payload = { Signers: [ { name: 'David', emailAddress: 'david@boldsign.dev', formFields: [ { fieldType: 'Signature', pageNumber: 1, bounds: { x: 100, y: 100, width: 100, height: 50 }, isRequired: true } ], recipientNotificationSettings: { signatureRequest: true, declined: true, revoked: true, signed: true, completed: true, expired: true, reassigned: true, deleted: true, reminders: true, editRecipient: true } } ], Files: [ 'data:application/pdf;base64,JVBERi0xLjcKJcfs...' ], Title: 'Agreement' }; const response = await axios.post( 'https://api.boldsign.com/v1/document/send', payload, { headers: { 'Content-Type': 'application/json', 'accept': 'application/json', 'X-API-KEY': '{your API key}' } } ); console.log(response.data);
<?php require_once "vendor/autoload.php"; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Request; $client = new Client([ 'verify' => false ]); $headers = [ 'X-API-KEY' => '{Your API Key}', 'Content-Type' => 'application/json', ]; $payload = [ "Signers" => [ [ "name" => "Sample document", "emailAddress" => "alexgayle@cubeflakes.com", "signerType" => "Signer", "formFields" => [ [ "id" => "string", "name" => "string", "fieldType" => "Signature", "pageNumber" => 1, "bounds" => [ "x" => 50, "y" => 50, "width" => 125, "height" => 25 ], "isRequired" => true ] ], "recipientNotificationSettings" => [ "signatureRequest" => true, "declined" => true, "revoked" => true, "signed" => true, "completed" => true, "expired" => true, "reassigned" => true, "deleted" => true, "reminders" => true, "editRecipient" => true ] ] ], "Files" => [ 'data:application/pdf;base64,JVBERi0xLjcKJcfs...' ], "Title" => 'Sample document' ]; $options = [ 'body' => json_encode($payload) ]; $request = new Request('POST', 'https://api.boldsign.com/v1/document/send', $headers); $res = $client->sendAsync($request, $options)->wait(); echo $res->getBody(); ?>
By customizing the recipientNotificationSettings
, you can control the notification experience for each recipient according to your requirements.