The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

Request Demo
BoldSign Logo Small

Features

Explore the BoldSign features that make eSigning easier.

Send eSignature Requests Through SMS with BoldSign API

Send eSignature Requests Through SMS with BoldSign API

Text messages are a preferred method for sending and receiving valuable information and documents. SMS are especially easy to access for people on the go, with just their cell phones with them. BoldSign lets senders with Advanced and Business plans send documents to signers via SMS, boosting completion rates and ensuring documents reach recipients through their preferred channel.

Sending the document for eSignature via SMS

With the BoldSign API, you can request signatures via SMS by setting the delivery mode as SMS and entering the phone number (including the country code) of the signer. Upon sending, signers will receive an SMS with a link to the BoldSign app, where they can review and electronically sign the document. Please note that an Advanced or Business plan with the proper add-on is required to send documents via SMS.

Asynchronous document processing

The process of document sending is asynchronous. Although you will promptly receive the document ID upon initiation, the actual file may still be undergoing processing in the background. To determine whether the document has been successfully sent, you must listen for the webhooks.

The system will trigger either a Sent or SendFailed event, indicating the success or failure of the document transmission, respectively. In the event of failure, the system will send a SendFailed event along with an accompanying error message. It is imperative to address and resolve this error to ensure the proper sending of the document in the next request. Read more about webhooks

Code snippets

Let’s see, in various programming languages, how to send a signature request via SMS.

Curl

    
curl -X 'POST' \
  'https://staging-api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your api key}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'Message=sign please' \
  -F 'Signers={
  "name": "star",
  "phoneNumber": {
    "countryCode": "{signer country code}",
"number": "{signer phone number}"
  },
 "deliveryMode": "SMS",
  "signerType": "Signer",
 
  "allowFieldConfiguration": true,
  "formFields": [
    {
      "id": "signature1",
      "fieldType": "Signature",
      "pageNumber": 1,
      "bounds": {
        "x": 130,
        "y": 130,
        "width": 82,
        "height": 32
      },
      "isRequired": true
    }
  ],
  "locale": "EN"
}' \
  -F 'Files=@bill.pdf;type=application/pdf' \
  -F 'Title=sample document' \       

C#

    
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: "signature",
                        isRequired: true,
                        type: FieldType.Signature,
                        pageNumber: 1,
                        bounds: new BoldSign.Model.Rectangle(x: 100, y: 100, width: 125, height: 25));

var formFieldCollections = new List<FormField>()
{
    signatureField
};
        var signer = new DocumentSigner(
            signerName: "David",
            phoneNumber: new PhoneNumber(
            countryCode: "{signer country code}",
            number: "{signer phone number}"),
            formFields: formFieldCollections,
            locale: Locales.EN);

        signer.DeliveryMode = DeliveryMode.SMS;

        var documentSigners = new List<DocumentSigner>()
{
    signer
};
        var sendForSign = new SendForSign()
        {
            Signers = documentSigners,
            Title = "Sample Document",
            Message="Please sign this",
            Files = filesToUpload
        };
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated.DocumentId.ToString());


Python

    
import requests
import json

url="https://api.boldsign.com/v1/document/send"
signer_data = {
    "name": "David",
    "phoneNumber": {
        "countryCode": "{signer country code}",
        "number": "{signer phone number}"
    },
    "signerType": "Signer",
    "deliveryMode": "SMS",
    "signerRole": "Signer",
    "formFields": [
    {
     "id": "Signature",
      "type": "FieldType.Signature", 
      "pageNumber": 1,
      "bounds": {
"x": 100,
        "y": 100,
        "width": 200,
        "height": 100
},
      "isRequired": True,
    }
    ],
    "locale": "EN"
}
headers = {
     'accept': 'application/json',
     'X-API-KEY': '{your API key}'
 }
payload = {
  
    'Signers': json.dumps(signer_data),
    'Title': "Sample Document",
    'Message': "Please sign this"
}
files = [
    ('Files', ('{your file name}', open('your file path', 'rb'), 'application/pdf'))
]
response = requests.post(url, headers=headers, data=payload, files=files)

Node.js

    
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
 
const form = new FormData();
form.append('Message', 'Please sign this.');
form.append('Signers', '{\n  "name": "David",\n "deliveryMode":"SMS",\n "phoneNumber":{"countryCode":"{signer country code}","number":"{signer phone number}"},\n  "formFields": [\n    {\n      "fieldType": "Signature",\n      "pageNumber": 1,\n      "bounds": {\n        "x": 100,\n        "y": 100,\n        "width": 100,\n        "height": 50\n      },\n      "isRequired": true\n    }\n  ]\n}');
form.append('Files', fs.createReadStream('{your file path}'));
form.append('Title', 'Sample document');
 
let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://api.boldsign.com/v1/document/send',
    headers: {
      'accept': 'application/json',
      'X-API-KEY': '{Your API key}',
      ...form.getHeaders()
    },
    data : form
  };
   
  axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

PHP

    
<?php
require_once 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\MultipartStream;

$client = new Client([
    'verify' => false, // Disables SSL verification
    'timeout' => 120, // Sets timeout to 120 seconds
]);
$apiKey = '{Your API key}';
$filePath = '{your file path}';
$signerCountryCode = '{signer country code}';
$signerPhoneNumber = '{signer phone number}';
$multipart = new MultipartStream([
    [
        'name' => 'Message',
        'contents' => 'Please sign this.'
    ],
    [
        'name' => 'Signers',
        'contents' => json_encode([
            'name' => 'David',
            'deliveryMode' => 'SMS',
            'phoneNumber' => [
                'countryCode' => $signerCountryCode,
                'number' => $signerPhoneNumber
            ],
            'formFields' => [
                [
                    'fieldType' => 'Signature',
                    'pageNumber' => 1,
                    'bounds' => [
                        'x' => 100,
                        'y' => 100,
                        'width' => 100,
                        'height' => 50
                    ],
                    'isRequired' => true
                ]
            ]
        ])
    ],
    [
        'name' => 'Files',
        'contents' => fopen($filePath, 'r'),
        'filename' => basename($filePath)
    ],
    [
        'name' => 'Title',
        'contents' => 'Sample document'
    ]
]);

$headers = [
    'X-API-KEY' => $apiKey,
    'Content-Type' => 'multipart/form-data; boundary=' . $multipart->getBoundary()
];
$request = new Request('POST', 'https://staging-api.boldsign.com/v1/document/send', $headers, $multipart);
try {
    $response = $client->send($request);
    echo $response->getBody();
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}

SMS notifications sent to signers

Our system sends text message notifications to signers for various events, ensuring signers stay informed. These include requests for signature, warnings about document expiration, alerts for document deletion, manual reminders, and notifications confirming the completion of a signature.

Conclusion

Sending out documents via text message improves efficiency and accessibility,  letting you reach signers through their preferred channel. Start your 30-day free BoldSign trial today and sent out documents via SMS.

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.

Picture of Starvritsa Buhungi

Starvritsa Buhungi

Starvritsa is a Technical Assistant at BoldSign, channelling her passion into crafting top-tier content for users through meticulous documentation. She creates content across various formats, including API tutorials, help articles, and comprehensive guides.

Share this blog

Picture of Starvritsa Buhungi

Starvritsa Buhungi

Starvritsa is a Technical Assistant at BoldSign, channelling her passion into crafting top-tier content for users through meticulous documentation. She creates content across various formats, including API tutorials, help articles, and comprehensive guides.

Subscribe RSS feed

Leave a Reply

Your email address will not be published. Required fields are marked *