Disable all email notifications using 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 using the API. This ensures that recipients will not receive any email communication associated with the signing process.

Follow these steps to disable email notifications while sending a document:

Disable email notifications for document sending

First, you need to send a document to the signer by disabling the email notifications. Here's how you can achieve this using the API.

Here are example codes that can be used to achieve this:

Code snippet to disable email notifications

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 'DisableEmails= true' \
     -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 '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 formFieldCollections = new List<FormField>()
{
    signatureField
};

var signer = new DocumentSigner(
  signerName: "David",
  signerType: SignerType.Signer,
  signerEmail: "david@cubeflakes.com",
  formFields: formFieldCollections,
  locale: Locales.EN);

var documentSigners = new List<DocumentSigner>()
{
    signer
};

var sendForSign = new SendForSign()
{
   Message = "please sign this",
   Title = "Agreement",
   DisableEmails = true,
   Signers = documentSigners,
   Files = filesToUpload
};
var documentCreated = documentClient.SendDocument(sendForSign);
import requests
import json

url = "https://api.boldsign.com/v1/document/send"

signer_data = {
    "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"
}

payload = {
    'DisableEmails': True,
    'Message': '',
    'Signers': json.dumps(signer_data),
    'Title': '{title}'
}

files = [
    ('Files', (
        'doc-2.pdf',
        open('{Your file path}', 'rb'),
        'application/pdf'
    ))
]

headers = {
    'accept': 'application/json',
    'X-API-KEY': '{Your API Key}'
}

response = requests.request("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('DisableEmails', 'true');
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('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);
});

In the example above, provide a document in the Files field and fill in the required fields such as Title and Signers. Configure the remaining fields according to your requirements. To disable email notifications, set the DisableEmails field as true.

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 Embeeded Signing in your application