Sending for signing

  1. Get the API key from here

  2. Get the documentId

  3. Prepare the JSON Body

Send a template for signing

BoloForms BASE_URL to use https://sapi.boloforms.com/signature

POST /pdf-template-lambda

Headers

NameValue

Content-Type

application/json

x-api-key

YOUR_API_KEY

Body

KeyRequiredValueDescriptionReference Image
signingType

YES

"PDF_TEMPLATE" or "FORM_TEMPLATE"

Select PDF_TEMPLATE if you want to send PDF template for signing else select FORM_TEMPLATE

N/A

receiversList

YES

[
    {
      "name": "Chirag Gupta",
      "email": "support@boloforms.com",
      "message": "Message me when you're done",
      "subject": "Please sign this Chirag",
      "roleTitle": "Senior Doctor",
      "roleColour": "#FEE0EF"
    },
    {
      "name": "Paresh Deshmukh",
      "email": "support@boloforms.com",
      "message": "Message me when you're done",
      "subject": "Please sign this Paresh",
      "roleTitle": "Junior Doctor",
      "roleColour": "#8FB1C8"
    }
  ],
name = name of the role
email = email of the role, it will send an email to the customer for signing
message = you can leave this empty it will take the message from mailData
subject = you can leave this empty it will take the message from mailData
roleTitle = this has to exactly same as the role you added while uploading PDF template otherwise it will not work properly
roleColour = give color to your role you can pass any hex code but it's nessacary
customVariables

NO

[
    { "varName": "[v1]", "varValue": "v1 value from api" }, // v1- variable name has to be in square barckets
    { "varName": "[v2]", "varValue": "v2 value from api" },
    { "varName": "[v3]", "varValue": "v3 value from api" }
  ]
varName = the key of the varuables you added in the template, it has to be exactly same
varValue = the value you want to pass to the variable
mailData

NO

 {
    "subject": "subject",
    // this is the global subject if you will not add anything in the receiversList
    // subject this will be sent
    "message": "message"
    // this is the global message if you will not add anything in the receiversList
    // message this will be sent
  }

This is not required to be added in required but is recommended to customize the email body and title according to your customers data, making the email more authentic

N/A

documentId

YES

"42d3b486-g946-4744-86cb-7ee25f634576"

pdfData

YES

 "data:application/pdf;base64,JVBERi0xLjQKJSDi48/TCjMKMApvYmoKPDwKL1R5cGUKL0NhdGFsb2cKL05hbWVzCjw8Cj4+Ci9QYWdlTGFiZWxzCjw8Ci9OdW1zClsKMAo8PAovUwovRAov"

The same PDF which you uploaded in the UI it needs to be sent via API as base64 because you can send a different PDF as well if you want other then the PDF you uploaded as a template with all your mapping and variables kept intact page by page

For example - Suppose you've uploaded a 50-page PDF where each page contains a signature field. Later, you need to send a PDF that is only 30 pages but follows the same format. Instead of creating a new template or manually setting up the fields again, you can simply send the new 30-page PDF as a base64 string via the API.

The system will automatically recognize the structure and map the fields to the correct locations, page by page, based on the original template. This ensures that the new PDF aligns with the existing template, saving time and avoiding redundancy.

Response

{
    "message": "Status Updated Successfully",
    "text": "This request has been completed.",
    "modifiedBody": {
        "receiversList": [
            {
                "name": "Chirag Gupta",
                "email": "support@boloforms.com",
                "message": "Message me when you're done",
                "subject": "Please sign this Chirag",
                "roleTitle": "Customer",
                "roleColour": "#FEE0EF"
            },
            {
                "name": "Paresh Deshmukh",
                "email": "support@boloforms.com",
                "message": "Message me when you're done",
                "subject": "Please sign this Chirag",
                "roleTitle": "BoloForms CEO",
                "roleColour": "#FEE0EF"
            }
        ],
        "mailData": {
            "subject": "subject",
            "message": "message"
        },
        "documentId": "f2c7f7b5-82b7-4e55-8805-dd820ae2625",
        "pdfLink": "https://boloforms-signatures-bucket.s3.ap-south-1.amazonaws.com/pdf-formTemplate/1723706845877.pdf",
        "signingType": "PDF_TEMPLATE",
        "apiKey": "ZI0j0LCdQY3PcskAUYkI58OP2zJ2d9R5z4lojqne",
        "customVariables": [
            {
                "varName": "[Customer Name]",
                "varValue": " Chirag Gupta"
            },
            {
                "varName": "[Customer DOB]",
                "varValue": "24/10/1996"
            }
        ]
        }
    }
}

Example Request

const axios = require('axios');
let data = JSON.stringify({
  "signingType": "PDF_TEMPLATE",
  "receiversList": [
    {
      "name": "Chirag Gupta",
      "email": "support@boloforms.com",
      "message": "Message me when you're done",
      "subject": "Please sign this Chirag",
      "roleTitle": "Senior Doctor",
      "roleColour": "#FEE0EF"
    },
    {
      "name": "Chirag Gupta",
      "email": "support@boloforms.com",
      "message": "Message me when you're done",
      "subject": "Please sign this Paresh",
      "roleTitle": "Junior Doctor",
      "roleColour": "#8FB1C8"
    }
  ],
  "customVariables": [
    { "varName": "[Customer Name]", "varValue": " Chirag Gupta" },
    { "varName": "[Customer DOB]", "varValue": "24/10/1996" }
  ]
  "documentId": "YOUR_PDF_DOCUMENT_ID",
  "pdfData": "data:application/pdf;base64,JVBERi0xLjQKJSDi48/TCjMKMApvYmoKPDwKL1R5cGUKL0NhdGFsb2cKL05hbWVzCjw8Cj4+Ci9QYWdlTGFiZWxzCjw8Ci9OdW1zClsKMAo8PAovUwovRAov"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://sapi.boloforms.com/signature/pdf-template-lambda',
  headers: { 
    'x-api-key': 'YOUR_API_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Last updated