Skip to content
  1. Blog
  2. API

Prefilling Form Fields After Sending eSignatures via API

TL;DR: You can fill in form fields on a document that is already out for signature. Find each field’s ID, then send the values to our Prefill Fields endpoint while the document is still in progress. The BoldSign eSignature API page shows what else you can automate.

You sent a contract for signature and then noticed the start date was blank. Revoking it and sending it again would confuse the signer and cost you time.

We let you fix that without starting over. This guide shows which fields you can prefill after sending, how to find their IDs, and the limits to plan for.

What does prefilling form fields after sending mean?

Prefilling sets a value in a form field on a document your signers already have. The signer then sees the value in place when they open the document.

Think of a paper form you handed to a client but forgot to date. You ask for it back for a moment, write the date in, and hand it over again. Prefilling does the same through code, and the signer never has to return anything.

Values often come from your own systems, such as a customer record or an order. Pulling them in by code avoids typing errors. Our Prefill form fields guide lists every option.

Which form fields can you prefill?

You can prefill six field types after sending. Each takes its value in a set format.

Text, date and choice fields

  • Text boxes take any text, such as a name or an address.
  • Checkboxes take “on” to tick the box or “off” to clear it.
  • Editable dates must match the date format used when you sent the document.

Radio buttons, dropdowns and images

  • Radio buttons take “on” or “off” on one button, which clears the others in its group.
  • Dropdowns must exactly match one of the listed options.
  • Image fields take a base64 data uniform resource identifier (URI), such as a logo or stamp.

How do you prefill form fields after sending a document?

Prefilling takes two steps. First you find the ID of each field, then you send the values.

Step 1: Find the form field IDs

You need the ID of every field you plan to fill. There are two ways to get it.

  1. Set custom IDs on your form fields when you send a document, so you know them in advance.
  2. Call the /v1/document/properties endpoint, which returns the generated ID for every field.

Our guide on how to retrieve document properties shows the second method.

Step 2: Send the values to the Prefill Fields endpoint

Send the document ID and a fields array to /v1/document/prefillFields. Each item in the array holds an id and a value.

The endpoint also supports the DataSyncTag. A value set on a field with a DataSyncTag also goes to every field of the same type with the same tag.

The samples below fill one field of each type.

curl --location --request PATCH \
  'https://api.boldsign.com/v1/document/prefillFields?documentId=YOUR_DOCUMENT_ID' \
  --header 'accept: */*' \
  --header 'X-API-KEY: {YOUR_API_KEY}' \
  --header 'Content-Type: application/json' \
  --data '{
  "fields": [
    {
      "id": "textbox_mShRr",
      "value": "John Doe"
    },
    {
      "id": "checkbox_b5yuo",
      "value": "on"
    },
    {
      "id": "radioChild_AknIg",
      "value": "on"
    },
    {
      "id": "editableDate_67P9d",
      "value": "05/10/2023"
    },
    {
      "id": "dropdown_qrsr1",
      "value": "United States"
    },
    {
      "id": "image_6Ogud",
      "value": "data:image/png;base64,iVBORw0KGgoAAAANS..."
    }
  ]
}'
var apiClient = new ApiClient("https://api.boldsign.com", "YOUR_API_KEY");

var documentClient = new DocumentClient(apiClient);

var prefillFieldRequest = new PrefillFieldRequest("YOUR_DOCUMENT_ID")
{
    Fields = new List<PrefillField>()
    {
        new PrefillField()
        {
            Id = "textbox_mShRr",
            Value = "John Doe"
        },
        new PrefillField()
        {
            Id = "checkbox_b5yuo",
            Value = "on"
        },
        new PrefillField()
        {
            Id = "radioChild_AknIg",
            Value = "on"
        },
        new PrefillField()
        {
            Id = "editableDate_67P9d",
            Value = "05/10/2023"
        },
        new PrefillField()
        {
            Id = "dropdown_qrsr1",
            Value = "United States"
        },
        new PrefillField()
        {
            Id = "image_6Ogud",
            Value = "data:image/png;base64,iVBORw0KGgoAAAANS..."
        }
    },
};

documentClient.PrefillFields(prefillFieldRequest);
import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    document_api = boldsign.DocumentApi(api_client)
    fields = [
        boldsign.PrefillField(id="textbox_mShRr", value="John Doe"),
        boldsign.PrefillField(id="checkbox_b5yuo", value="on"),
        boldsign.PrefillField(id="radioChild_AknIg", value="on"),
        boldsign.PrefillField(id="editableDate_67P9d", value="05/10/2023"),
        boldsign.PrefillField(id="dropdown_qrsr1", value="United States"),
        boldsign.PrefillField(id="image_6Ogud", value="data:image/png;base64,iVBORw0KGgoAAAANS..."),
    ]

    prefill_field_request = boldsign.PrefillFieldRequest(fields=fields)

    document_api.prefill_fields(
        document_id="YOUR_DOCUMENT_ID", prefill_field_request=prefill_field_request
    )
<?php
require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\{PrefillField, PrefillFieldRequest};

$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);

$fields = [];

$f = new PrefillField();
$f->setId('textbox_mShRr');
$f->setValue('John Doe');
$fields[] = $f;

$f = new PrefillField();
$f->setId('checkbox_b5yuo');
$f->setValue('on');
$fields[] = $f;

$f = new PrefillField();
$f->setId('radioChild_AknIg');
$f->setValue('on');
$fields[] = $f;

$f = new PrefillField();
$f->setId('editableDate_67P9d');
$f->setValue('05/10/2023');
$fields[] = $f;

$f = new PrefillField();
$f->setId('dropdown_qrsr1');
$f->setValue('United States');
$fields[] = $f;

$f = new PrefillField();
$f->setId('image_6Ogud');
$f->setValue('data:image/png;base64,iVBORw0KGgoAAAANS...');
$fields[] = $f;

$prefill_field_request = new PrefillFieldRequest();
$prefill_field_request->setFields($fields);

$document_api->prefillFields($document_id = 'YOUR_DOCUMENT_ID',
    $prefill_field_request);
?>
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");

DocumentApi documentApi = new DocumentApi(client);
PrefillField pfTextbox = new PrefillField();
pfTextbox.setId("textbox_mShRr");
pfTextbox.setValue("John Doe");

PrefillField pfCheckbox = new PrefillField();
pfCheckbox.setId("checkbox_b5yuo");
pfCheckbox.setValue("on");

PrefillField pfRadio = new PrefillField();
pfRadio.setId("radioChild_AknIg");
pfRadio.setValue("on");

PrefillField pfDate = new PrefillField();
pfDate.setId("editableDate_67P9d");
pfDate.setValue("05/10/2023");

PrefillField pfDropdown = new PrefillField();
pfDropdown.setId("dropdown_qrsr1");
pfDropdown.setValue("United States");

PrefillField pfImage = new PrefillField();
pfImage.setId("image_6Ogud");
pfImage.setValue("data:image/png;base64,iVBORw0KGgoAAAANS...");

PrefillFieldRequest prefillFieldRequest = new PrefillFieldRequest();
prefillFieldRequest.setFields(
        Arrays.asList(pfTextbox, pfCheckbox, pfRadio, pfDate, pfDropdown, pfImage));

documentApi.prefillFields("YOUR_DOCUMENT_ID", prefillFieldRequest);
import { DocumentApi, PrefillField, PrefillFieldRequest } from "boldsign";

async function main() {
  const documentApi = new DocumentApi();
  documentApi.setApiKey("YOUR_API_KEY");

  const fields = [];

  let field = new PrefillField();
  field.id = "textbox_mShRr";
  field.value = "John Doe";
  fields.push(field);

  field = new PrefillField();
  field.id = "checkbox_b5yuo";
  field.value = "on";
  fields.push(field);

  field = new PrefillField();
  field.id = "radioChild_AknIg";
  field.value = "on";
  fields.push(field);

  field = new PrefillField();
  field.id = "editableDate_67P9d";
  field.value = "05/10/2023";
  fields.push(field);

  field = new PrefillField();
  field.id = "dropdown_qrsr1";
  field.value = "United States";
  fields.push(field);

  field = new PrefillField();
  field.id = "image_6Ogud";
  field.value = "data:image/png;base64,iVBORw0KGgoAAAANS...";
  fields.push(field);

  const prefillFieldRequest = new PrefillFieldRequest();
  prefillFieldRequest.fields = fields;

  await documentApi.prefillFields("YOUR_DOCUMENT_ID", prefillFieldRequest);
}

main();

What limits apply when you prefill fields?

Three rules decide whether a prefill request works. Check them before you build prefilling into your app.

Some field types stay with the signer

You cannot prefill these field types through the Prefill Fields endpoint:

  • Name, Email and Title
  • Signature, Initial and DateSigned
  • Company, Label and Hyperlink
  • Attachment and Drawing

The signer must not have signed yet

Each field belongs to a signer. Once that signer completes their part, the fields they own are locked.

The document must be in progress

We accept prefill requests only for documents in the In Progress status. Requests fail on documents with any of these statuses:

  • Revoked or Declined
  • Expired or Completed
  • Draft, or a document created from an embedded request link

Can you prefill fields from a template instead?

Yes, and it suits documents you send often. You fill the template’s existing fields in the same request that sends the document.

Our guide to send a document from a template by filling existing fields walks through it. Read how to prefill form details before sending a document to do it in the web app.

Which BoldSign plan do you need for the API, and what does it cost?

Every endpoint in this guide works in a free API sandbox, with no credit card. Sandbox documents carry a test watermark and are deleted after 14 days.

Live API calls need the Enterprise API plan, from $30 a month with 40 envelopes, billed yearly. Each extra envelope costs $0.75. Prices are in USD as of November 2026, and the pricing page lists every plan.

How do you start prefilling fields with BoldSign?

Start in the sandbox and send a test document to yourself. Then prefill a field and open the signing link to see the value in place.

Frequently asked questions

Can I fill in form fields after I send a document for signature?

Yes. Our Prefill Fields API sets field values on a document that is already out for signature. The document must be in progress, and the signer who owns the field must not have signed yet.

What e-signature API supports document sending, signer fields, and signing status?

The BoldSign API covers all three. You send documents with signer fields, prefill those fields later, and read the document status and each signer's status from the document properties endpoint.

Which field types can I prefill with the API?

You can prefill text boxes, checkboxes, radio buttons, editable dates, dropdowns and image fields. Signature, initial, name, email and similar fields stay with the signer.

Where do I find the ID of a form field?

Set your own ID on each field when you send the document. Otherwise call the document properties endpoint, which lists every field with its generated ID.

How do I prefill an image field?

Send the image as a base64 data URI, such as data:image/png;base64 followed by the encoded content. Most common image types work.

Can I prefill a field after the signer has signed?

No. Once a signer completes their part, the fields they own are locked. Prefill them before that signer opens and signs the document.

Can I prefill a draft or an embedded request?

No. Prefilling works only on documents in progress. Drafts and documents created through embedded request links are not supported.

Do I need a paid plan to test prefilling?

No. A free API sandbox account lets you test every endpoint with no credit card. Sandbox documents carry a test watermark and are deleted after 14 days.

Gopinath Kannusamy

Gopinath is a passionate software developer with 2 years of experience at BoldSign. He is an avid writer and enjoys sharing his insights on technology and development. In his free time, he enjoys exploring new technologies and learning new things. Connect with him on LinkedIn.

More posts by Gopinath Kannusamy
Get started

Sign up for your free trial today!

Start free trial
  • 30-day free trial
  • No credit card required