Send document from template by filling existing fields

This article provides a guide on how to create a template in BoldSign's web app, and then use that template to fill in existing field values programmatically and send the document for signature. For instance, if you have a claim form and your user submits a form with values, you may need to pre-fill those values in the BoldSign form fields programmatically and send a signature request to your user.

Follow the steps below to send a document for signature using an already created template:

  1. Create a template in BoldSign's web app. See How to Create a Template in the BoldSign Web App for instructions.
  2. Make a note of the unique field ID for each field that you add to the template. You will need these field IDs later to programmatically fill in the fields using the BoldSign API.
  3. Use the copied template ID and field IDs to fill in the fields with values and send the document to your signers.

Here's an example of the Curl command you can use to do this:

Code snippet

curl --location --request POST '{templateID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbG...' \
--data-raw '{
    "roles": [
            "RoleIndex": 1,
            "SignerEmail": "",
            "SignerName": "Signer Name",
            "ExistingFormFields": [
                    "Id": "State",
                    "Value": "North Carolina"
                    "Id": "Country",
                    "Value": "United States"

In the above example, replace the templateId with the ID of the template you created earlier. Then, update the SignerEmail and SignerName properties with the email and name of the signer you want to send the document to. Finally, use the field IDs you noted earlier to fill in the fields with the desired values, and include those field IDs and values in the ExistingFormFields array.

That's it! Once you run the code, the document will be sent for signature with the fields pre-filled with the specified values.