Text messages and emails are two of the most effective channels for document delivery. BoldSign’s API allows you to send signature requests via both email and SMS using a single template, ensuring that your documents reach signers through both channels.
Sending a document via email and SMS
To send a document for eSignature via both email and SMS, you need to specify the deliveryMode as EmailAndSMS and include the signer’s phone number in the phoneNumber object by providing the countryCode and number of the signer.
Code snippets
Let’s explore how to send a signature request from a template via email and SMS in various programming languages.
curl -X 'POST' \
'https://api.boldsign.com/v1/template/send?templateId=8fbed3d0-yyyy-xxxx -21f041809b72' \
-H 'accept: application/json' \
-H 'X-API-KEY: {Your API Key}' \
-H 'Content-Type: application/json' \
-d '{
"title": "Testing",
"message": "msg",
"roles": [
{
"roleIndex": 1,
"signerName": "Alex",
"signerEmail": "[email protected]",
"phoneNumber": {
"countryCode": "{Signer’s Country Code}",
"number": "{Signer’s Phone Number}"
},
"deliveryMode": "EmailAndSMS",
"signerType": "Signer",
"signerRole": "HR"
}
],
"sendViaSMS": true
}'
var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}");
var templateClient = new TemplateClient(apiClient);
var templateRole = new Roles()
{
SignerName = "Alex",
SignerEmail = "[email protected]",
SignerRole = "HR",
SignerType = SignerType.Signer,
RoleIndex = 1,
DeliveryMode = DeliveryMode.EmailAndSMS,
PhoneNumber = new PhoneNumber()
{
CountryCode="{Signer’s Country Code}",
Number = "{Signer’s Phone Number}"
},
};
var roles = new List<Roles>
{
templateRole,
};
var sendForSignFromTemplate = new SendForSignFromTemplate()
{
TemplateId = "8fbed3d0-yyyy-xxxx-21f041809b72",
Roles = roles
};
var documentCreated = templateClient.SendUsingTemplate(sendForSignFromTemplate);
import requests
import json
url = "https://api.boldsign.com/v1/template/send?templateId=8fbed3d0-yyyy-xxxx -21f041809b72"
payload = {
"title": "Testing",
"message": "msg",
"roles": [
{
"roleIndex": 1,
"signerName": "Alex",
"signerEmail": "[email protected]",
"phoneNumber": {
"countryCode": "{Signer’s Country Code}",
"number": "{Signer’s Phone Number}"
},
"deliveryMode": "EmailAndSMS",
"signerType": "Signer",
"signerRole": "HR"
}
],
"sendViaSMS": True
}
headers = {
'accept': 'application/json',
'X-API-KEY': '{Your API Key}',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.text)
const axios = require('axios');
const data = JSON.stringify({
"title": "Testing",
"message": "msg",
"roles": [
{
"roleIndex": 1,
"signerName": "Alex",
"signerEmail": "[email protected]",
"phoneNumber": {
"countryCode": "{Signer’s Country Code}",
"number": "{Signer’s Phone Number}"
},
"deliveryMode": "EmailAndSMS",
"signerType": "Signer",
"signerRole": "HR"
}
],
"sendViaSMS": true
});
const config = {
method: 'post',
url: 'https://api.boldsign.com/v1/template/send?templateId=8fbed3d0-yyyy-xxxx -21f041809b72',
headers: {
'accept': 'application/json',
'X-API-KEY': '{Your API Key}',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Benefits
- Relevant access points: Reach your signers via their preferred channels.
- Increased engagement: Using both email and SMS increases the likelihood that your documents will be signed promptly.
- Efficiency: Simplify your document-sending process using templates.
Conclusion
Sending documents for signature via SMS and email improves signing efficiency and accessibility by ensuring that signers receive notifications through both channels. By using BoldSign’s API and its powerful template functionality, you can streamline the signature request process and ensure a seamless experience for both senders and recipients. Start your 30-day free BoldSign trial today and send documents via SMS and email so that no document goes unnoticed.We value your feedback, so please share your thoughts below. If you have any questions or need more information about our services, don’t hesitate to schedule a demo or reach out to our support team through our support portal.
