Articles in this section
Category / Section

How to send document by merging multiple templates and notify the signer through email using API?

Published:
4 mins read

This guide will walk you through the process of sending a document by merging multiple templates and notify the signer through email using BoldSign API. If you need to send the same static documents via email, creating templates with the documents and utilizing these templates for signatures is an efficient approach.

Create templates in BoldSign’s web app

Send document to the signer via email

Here, we provide example code snippets for sending a document using templates to the signer via email. You can choose the code snippet that corresponds to your preferred programming language:

Code snippet

curl -X 'POST' \ 'https://api.boldsign.com/v1-beta/template/mergeAndSend' \
    -H 'accept: application/json' \
    -H 'X-API-KEY: {your API key}' \
    -H 'Content-Type: application/json;odata.metadata=minimal;odata.streaming=true' \
    -d '{
      "templateIds": [
         "4fe17627-xxxx-41ff-xxxx-0af80fd77740", "d57d9f60-xxxx-4f30-xxxx-2830b6a8fb3f"
       ],
      "title": "Invitation form",
      "message": "Kindly review and sign this.",
      "roles": [
       {
       "roleIndex": 1,
       "signerName": "David",
       "signerEmail": "david@cubeflakes.com",
       "signerType": "Signer",
       "deliveryMode": "Email",
       "formFields": [
                       {
                           "id": "SignField",
                           "fieldType": "Signature",
                           "pageNumber": 1,
                           "bounds": {
                           "x": 100,
                           "y": 100,
                           "width": 100,
                           "height": 50
                           },
                           "isRequired": true
                       }
                   ],      
       "locale": "EN"
       }
   ]
}'

In the code snippets above, ensure to update the templateIds with the IDs of the templates you’ve created. Update the deliveryMode as Email. Additionally, modify the signerEmail and signerName properties to match the email and name of the signer you intend to send the document to. You can also provide form field details for the document in the formFields array.

After executing the code, a document will be generated, and an email will be dispatched to the signer. The recipient can sign the document by clicking the link in the email.

Email received by the signer after executing the above code

Email received by signer

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied