Send Signature Requests from Templates via Both Email and SMS Using the API

send-signature-requests-from-templates-og
send-signature-requests-from-templates-og

Table of Contents

Sign Docs 3x Faster

Send, sign, and manage documents securely and efficiently.

Summarize the blog post with:

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" 
} 
] 
}'
    

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 = "Your_template_id", 
    Roles = roles 
}; 
var documentCreated = templateClient.SendUsingTemplate(sendForSignFromTemplate); 
    

import boldsign 
 
configuration = boldsign.Configuration( 
host="https://api.boldsign.com", 
api_key="YOUR_API_KEY" 
) 
 
with boldsign.ApiClient(configuration) as api_client: 
 
template_api = boldsign.TemplateApi(api_client) 
 
phone_number = boldsign.PhoneNumber( 
countryCode="Signer’s Country Code", 
number="Signer’s Phone Number", 
) 
 
role = boldsign.Role( 
roleIndex=1, 
signer_name="Alex Gayle", 
signer_email="[email protected]", 
signerType="Signer", 
deliveryMode="EmailAndSMS", 
phoneNumber=phone_number 
) 
 
send_for_sign_from_template = boldsign.SendForSignFromTemplateForm( 
roles=[role] 
) 
 
document_created = template_api.send_using_template( 
template_id="Your_Template_Id", 
send_for_sign_from_template_form=send_for_sign_from_template) 
    

<?php
require_once "vendor/autoload.php"; 
 
use BoldSign\Configuration; 
use BoldSign\Api\TemplateApi; 
use BoldSign\Model\Role; 
use BoldSign\Model\PhoneNumber; 
use BoldSign\Model\SendForSignFromTemplateForm; 
 
$config = new Configuration(); 
$config->setHost('https://api.boldsign.com'); 
$config->setApiKey('YOUR_API_KEY'); 
 
$templateApi = new TemplateApi($config); 
 
$role = new Role(); 
$role->setRoleIndex(1); 
$role->setSignerName('Alex Gayle'); 
$role->setSignerEmail('[email protected]'); 
$role->setSignerType('Signer'); 
$role->setDeliveryMode('EmailAndSMS'); 
 
$phoneNumber = new PhoneNumber(); 
$phoneNumber->setCountryCode('Signer’s Country Code'); 
$phoneNumber->setNumber('Signer’s Phone Number'); 
 
$role->setPhoneNumber($phoneNumber); 
 
$sendForSignFromTemplate = new SendForSignFromTemplateForm(); 
$sendForSignFromTemplate->setRoles([$role]); 
 
$documentCreated = $templateApi->sendUsingTemplate( 
'YOUR_TEMPLATE_ID', 
$sendForSignFromTemplate 
);
    

ApiClient client = Configuration.getDefaultApiClient(); 
client.setBasePath("https://api.boldsign.com"); 
client.setApiKey("YOUR_API_KEY"); 
 
TemplateApi templateApi = new TemplateApi(client); 
 
Role role = new Role(); 
role.setRoleIndex(1); 
role.setSignerName("Alex Gayle"); 
role.setSignerEmail("[email protected]"); 
role.setSignerType(Role.SignerTypeEnum.SIGNER); 
role.setDeliveryMode(Role.DeliveryModeEnum.EMAIL_AND_SMS); 
 
PhoneNumber phoneNumber = new PhoneNumber(); 
phoneNumber.setCountryCode("Signer’s Country Code"); 
phoneNumber.setNumber("Signer’s Phone Number"); 
 
role.setPhoneNumber(phoneNumber); 
 
SendForSignFromTemplateForm sendForSignFromTemplate = new SendForSignFromTemplateForm(); 
sendForSignFromTemplate.setRoles(Arrays.asList(role)); 
 
try { 
DocumentCreated documentCreated = templateApi.sendUsingTemplate( 
"Your_Template_Id", 
sendForSignFromTemplate 
); 
    

import { TemplateApi, Role, SendForSignFromTemplateForm } from "boldsign"; 
 
const templateApi = new TemplateApi("https://api.boldsign.com"); 
templateApi.setApiKey("YOUR_API_KEY"); 
 
const role = new Role(); 
role.roleIndex = 1; 
role.signerName = "Alex Gayle"; 
role.signerEmail = "[email protected]"; 
role.signerType = Role.SignerTypeEnum.Signer; 
role.deliveryMode = Role.DeliveryModeEnum.EmailAndSms; 
 
role.phoneNumber = { 
countryCode: "Signer’s Country Code", 
number: "Signer’s Phone Number" 
}; 
 
const sendForSignFromTemplate = new SendForSignFromTemplateForm(); 
sendForSignFromTemplate.roles = [role]; 
 
const documentCreated = await templateApi.sendUsingTemplate( 
"Your_template_id", 
sendForSignFromTemplate 
);
    

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.

Like what you see? Share with a friend.

Latest blog posts

How a Retention of Title Clause Protects Consigned Goods

How a Retention of Title Clause Protects Consigned Goods

Learn how a retention of title clause protects consigned goods, preserves ownership rights, and reduces creditor risks when a consignee becomes insolvent.

How to Sign a Document Online with a Legally Valid Electronic Signature

How to Sign a Document Online with a Legally Valid Electronic Signature

Learn how to sign documents online with legally valid electronic signatures, meet U.S. legal requirements, and use key features that strengthen your proof.

E-Signature Audit Trail: What It Records and Why It Matters

E-Signature Audit Trail: What It Records and Why It Matters

See what an e-signature audit trail records, why it matters for UETA, HIPAA, and eIDAS compliance, and how BoldSign automates it for every signed document.

Sign up for your free trial today!

  • Yes
    30-day free trial
  • Yes
    No credit card required
  • Yes
    30-day free trial
  • Yes
    No credit card required
Sign up for a free BoldSign trial