Skip to content
Proud to collaborate with Microsoft for Startups

docusign.document-generation.put-envelope-doc-gen-form-fields ​

This 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.

Updates sender fields for an envelope.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-docusign
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
envelopeidstringYes—The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec
update_docgen_formfields_onlystringNo—When false or omitted, the documents are updated. When true, only the form fields are updated. The documents are unchanged.
docgenformfieldslistNo—A list of docGenFormFields objects.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
envelopeidstringYes—The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec
update_docgen_formfields_onlystringNo—When false or omitted, the documents are updated. When true, only the form fields are updated. The documents are unchanged.
docgenformfieldslistNo—A list of docGenFormFields objects.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "docusign.document-generation.put-envelope-doc-gen-form-fields",
  "initial_data": {
    "base_url": "value",
    "accountid": "value",
    "envelopeid": "value"
  }
}