How to disable email notifications when sending document from template using BoldSign API?
If you want to manage the signature process within your application and prevent email notifications from being sent to signers, BoldSign allows you to disable email notifications when sending documents from template using the API. This ensures that recipients will not receive any email communication associated with the signing process.
Create a template in BoldSign's web app
Templates are created in the same way as regular documents, but instead of associating signature fields with people, we simply associate fields with roles. Create a template in BoldSign's web app. See How to Create a Template in the BoldSign Web App for instructions. When you need to send the same contracts out for signature to different groups of people repeatedly, you can use templates to save time.
Disable email notifications when sending document from template
This section will explain the process of disabling email notifications when sending a document from the template.
Code snippet
curl -X 'POST' \ 'https://api.boldsign.com/v1/template/send?templateId=4fe17627-xxxx-41ff-xxxx-0af80fd77740' \ -H 'accept: application/json' \ -H 'X-API-KEY: {your API key}' \ -H 'Content-Type: application/json;odata.metadata=minimal;odata.streaming=true' \ -d '{ "roles": [ { "roleIndex": 1, "signerName": "David", "signerEmail": "david@cubeflakes.com", "formFields": [ { "id": "Sign", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 100, "height": 50 }, "isRequired": true } ], "locale": "EN" } ], "disableEmails": true, }' \
var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}"); var templateClient = new TemplateClient(apiClient); 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 templateRole = new Roles( roleSignerIndex:1, roleSignerName:"David", roleSignerEmailAddress:"david@cubeflakes.com", formFields: formFieldCollections, locale: Locales.EN); var roles = new List<Roles> { templateRole, }; var sendForSignFromTemplate = new SendForSignFromTemplate() { TemplateId = "4fe17627-xxxx-41ff-xxxx-0af80fd77740", Roles = roles, DisableEmails=true }; var documentCreated = await templateClient.SendUsingTemplateAsync(sendForSignFromTemplate).ConfigureAwait(false); Console.WriteLine(documentCreated.DocumentId.ToString());
import requests url = "https://api.boldsign.com/v1/template/send?templateId=4fe17627-xxxx-41ff-xxxx-0af80fd77740" payload = { "roles": [ { "roleIndex": 1, "signerName": "David", "signerEmail": "david@cubeflakes.com", "formFields": [ { "id": "sign", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 100, "height": 50 }, "isRequired": True } ], } ], "disableEmails":True, } headers = { 'accept': 'application/json', 'X-API-KEY': '{Your API key}', 'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true' } response = requests.post(url, headers=headers, json=payload) print(response.text)
const axios = require('axios'); const response = axios.post( 'https://api.boldsign.com/v1/template/send?templateId=4fe17627-xxxx-41ff-xxxx-0af80fd77740', { 'roles': [ { 'roleIndex': 1, 'signerName': 'David', 'signerEmail': 'david@cubeflakes.com', 'formFields': [ { 'id': 'sign', 'fieldType': 'Signature', 'pageNumber': 1, 'bounds': { 'x': 100, 'y': 100, 'width': 100, 'height': 50 }, 'isRequired': true } ], } ], 'disableEmails': true, }, { headers: { 'accept': 'application/json', 'X-API-KEY': '{Your API key}', 'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true' } } ).then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
In the above example, update the templateId
with the ID of the template you created earlier. Configure the remaining fields according to your requirements. To disable email notifications, set the DisableEmails
field as true
. After executing the above code, the document will be created, and an email notifications will not be sent to the signer.
With email notifications disabled, you can proceed to obtain the signer's signature within your application using embedded signing. You can embed the signing request in your application to facilitate the signature process without sending email notifications. For detailed steps on how to integrate embedded signing into your application, refer to this article Integrate Embedded Signing in your application.