https://www.docusign.com/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFieldsThis method dynamically generates an envelope's documents by populating its sender fields. The envelope must be in a draft state. Use the DocumentGeneration::getEnvelopeDocGenFormFields response to retrieve the list of sender fields for your envelope. Use that list to build the request for this method. For each field, specify the field name and the value to populate. For example, your request body might look like this: ```json { "docGenFormFields": [ { "documentId": "bf3202e1-xxxx-xxxx-xxxx-af4f41366879", "docGenFormFieldList": [ { "name": "Candidate_Name", "value": "Peggy Olson" }, { "name": "Job_Title", "value": "Technical Writer" }, { "name": "Manager_Name", "value": "Donald Draper" }, { "name": "Start_Date", "value": "1960-02-28" }, { "name": "Salary", "value": "3380" } ] } ] } ``` ### Important notes * If `update_docgen_formfields_only` is false (the default), the `documentId` changes after the update. * This endpoint does not validate number, date, or select data field values. The request can succeed even if a number or date field value is not a valid number or date, or if a select field value is not one of the allowed values. ### Related topics - Learn about document generation in the eSignature concepts guide. - See this method in use in your preferred coding language.
The external account number (int) or account ID GUID.
The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
When **false** or omitted, the documents are updated. When **true,** only the form fields are updated. The documents are unchanged.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request PUT \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}https://www.docusign.com/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFieldsThis method dynamically generates an envelope's documents by populating its sender fields. The envelope must be in a draft state. Use the DocumentGeneration::getEnvelopeDocGenFormFields response to retrieve the list of sender fields for your envelope. Use that list to build the request for this method. For each field, specify the field name and the value to populate. For example, your request body might look like this: ```json { "docGenFormFields": [ { "documentId": "bf3202e1-xxxx-xxxx-xxxx-af4f41366879", "docGenFormFieldList": [ { "name": "Candidate_Name", "value": "Peggy Olson" }, { "name": "Job_Title", "value": "Technical Writer" }, { "name": "Manager_Name", "value": "Donald Draper" }, { "name": "Start_Date", "value": "1960-02-28" }, { "name": "Salary", "value": "3380" } ] } ] } ``` ### Important notes * If `update_docgen_formfields_only` is false (the default), the `documentId` changes after the update. * This endpoint does not validate number, date, or select data field values. The request can succeed even if a number or date field value is not a valid number or date, or if a select field value is not one of the allowed values. ### Related topics - Learn about document generation in the eSignature concepts guide. - See this method in use in your preferred coding language.
The external account number (int) or account ID GUID.
The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
When **false** or omitted, the documents are updated. When **true,** only the form fields are updated. The documents are unchanged.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request PUT \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}