DocuSign: Updates sender fields for an envelope
DocuSign esignature.esignatureDocGenFormFieldsPutEnvelopeDocGenFormFields: arguments, response, policy and SDK examples.
← Esignature operations · Get started
Operation docusign.esignature_docgenformfields_putenvelopedocgenformfields
Provider route: PUT /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/docGenFormFields. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/docusign with npm, or alter-sdk-docusign with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DocuSignIntegration } from "@alter-ai/docusign";
async function execute(input: Parameters<DocuSignIntegration["esignature"]["esignatureDocGenFormFieldsPutEnvelopeDocGenFormFields"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DocuSignIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.esignature.esignatureDocGenFormFieldsPutEnvelopeDocGenFormFields(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_docusign import DocuSignIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DocuSignIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.esignature.esignature_doc_gen_form_fields_put_envelope_doc_gen_form_fields(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.accountId | string | Required within parent | |
path.envelopeId | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.update_docgen_formfields_only | string | Optional | |
body | Model | Optional | Expand Updates sender fields for an envelope — request body — body |
Referenced models: Updates sender fields for an envelope — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Returns sender fields for an envelope — response body |
Referenced models: Returns sender fields for an envelope — response body
Schemas
Section titled “Schemas”1 more schema is linked from the tables above, on the schema pages.
Returns sender fields for an envelope — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An object for document generation responses. |
docGenFormFields | array | Optional | A list of `docGenFormFields` objects. |
docGenFormFields[] | Model | Each item | Expand Returns sender fields for an envelope — response body — doc Gen Form Fields item |
errorDetails | Model | Optional | Expand Locks a template — response body — error Details This object describes errors that occur. It is only valid for responses and ignored in requests. |
Referenced models: Returns sender fields for an envelope — response body — doc Gen Form Fields item, Locks a template — response body — error Details
Updates sender fields for an envelope — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object maps the document generation fields to their values. |
docGenFormFields | array | Optional | A list of `docGenFormFields` objects. |
docGenFormFields[] | Model | Each item | Expand Returns sender fields for an envelope — response body — doc Gen Form Fields item |
Referenced models: Returns sender fields for an envelope — response body — doc Gen Form Fields item
Returns sender fields for an envelope — response body — doc Gen Form Fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A collection of document generation fields. |
docGenDocumentStatus | string | Optional | The status of the document. This is a read-only property, and not used in [updateEnvelopeDocGenFormFields][docgen update]. Valid values: - `mergesucceeded` - `created` - `hassyntaxerror` [docgen update]: /docs/esign-rest-api/reference/envelopes/documentgeneration/updateenvelopedocgenformfields/ |
docGenErrors | array | Optional | A list of `docGenSyntaxError` objects. |
docGenErrors[] | Model | Each item | Expand Updates a template document — response body — doc Gen Errors item |
docGenFormFieldList | array | Optional | A list of `docGenFormField` objects. |
docGenFormFieldList[] | Model | Each item | Expand Updates a template document — response body — doc Gen Form Fields item |
documentId | string | Optional | The GUID of the document. |
Referenced models: Updates a template document — response body — doc Gen Form Fields item, Updates a template document — response body — doc Gen Errors item
Locks a template — response body — error Details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object describes errors that occur. It is only valid for responses and ignored in requests. |
errorCode | string | Optional | The code associated with the error condition. |
message | string | Optional | A brief message describing the error condition. |
Updates a template document — response body — doc Gen Form Fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The document fields available for document generation. This object is used in reponses (GET) and requests (PUT). When used with [DocumentGeneration: updateEnvelopeDocGenFormFields](/docs/esign-rest-api/reference/envelopes/documentgeneration/updateenvelopedocgenformfields/) (PUT), the `name` and `value` / `rowValues` properties are required and any other values are ignored. |
connectedObjectDetails | Model | Optional | Expand Returns tabs on a template — response body — ssn Tabs item connected Object Details |
defaultValue | string | Optional | |
description | string | Optional | A description of the field. Displayed with the label. |
filter | string | Optional | An object used to present a filtered view of the items in a folder. |
format | Model | Optional | Expand Updates a template document — response body — doc Gen Form Fields item format |
fullyQualifiedPath | string | Optional | |
hidden | string | Optional | |
label | string | Optional | A label displayed near the field. |
name | string | Optional | The name of the sender field. Required for PUT requests. |
options | array | Optional | When `type` is `Select`, this array describes the available options. |
options[] | Model | Each item | Expand Updates a template document — response body — doc Gen Form Fields item options item |
order | string | Optional | The order in which to sort the results. Valid values are: * `asc`: Ascending order. * `desc`: Descending order. |
predefinedValidation | string | Optional | Reserved for Docusign. |
readOnly | string | Optional | |
required | string | Optional | When **true,** the field is required. |
rowValues | array | Optional | For fields of type `TableRow`, this property represents the sender fields in the row. For GET requests, this array contains a single `docGenFormFieldRowValue` object. That object contains a list of sender fields that will appear in each row. For PUT requests, you must supply a `docGenFormFieldRowValue` object for each row in the table. This populates the data in the table. |
rowValues[] | Model | Each item | Expand Updates a template document — response body — doc Gen Form Fields item row Values item |
type | string | Optional | The kind of data the sender field holds. Valid values: - `TextBox` - `Date` - `Number` - `Select` - `TableRow` |
validation | Model | Optional | Expand Updates a template document — response body — doc Gen Form Fields item validation Describes how values are validated. |
value | string | Optional | The value of the sender field. For PUT requests, you must supply either this property (for all fields except `TableRow` types) or `rowValues` (for `TableRow` fields). |
Referenced models: Returns tabs on a template — response body — ssn Tabs item connected Object Details, Updates a template document — response body — doc Gen Form Fields item options item, Updates a template document — response body — doc Gen Form Fields item row Values item, Updates a template document — response body — doc Gen Form Fields item validation, Updates a template document — response body — doc Gen Form Fields item format
Updates a template document — response body — doc Gen Errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes document generation errors. |
errorCode | string | Optional | A code associated with the error condition. |
message | string | Optional | The error message. |
tagIdentifier | string | Optional | The tag that caused the syntax error. See [Document Generation Syntax](https://support.docusign.com/s/document-item?bundleId=als1679428547895&topicId=ftc1679700030026.html) to learn more about document generation syntax rules. |
Returns tabs on a template — response body — ssn Tabs item connected Object Details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
recordId | string | Optional |
Updates a template document — response body — doc Gen Form Fields item options item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specifies an individual option setting when type is `Select`. |
description | string | Optional | Description of the selectable option. |
label | string | Optional | The label for the selectable option. |
selected | string | Optional | When **true,** the option is selected. |
value | string | Optional | Specifies the value of the option. This is the value of the form field when this option is selected. |
Updates a template document — response body — doc Gen Form Fields item row Values item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An object representing a row of a dynamic table. |
docGenFormFieldList | array | Optional | The sender fields in each row of the table. For GET requests, the `label`, `type`, `required`, and `name` properties will be returned. For POST requests, supply the `name` and `value` for each child object. These correspond to the values in each column. |
docGenFormFieldList[] | Model | Each item | Expand Updates a template document — response body — doc Gen Form Fields item |
Referenced models: Updates a template document — response body — doc Gen Form Fields item
Updates a template document — response body — doc Gen Form Fields item validation
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes how values are validated. |
errorMessage | string | Optional | The error message when validation fails. |
expression | string | Optional | The expression used to validate values. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: docusign.esignature_docgenformfields_putenvelopedocgenformfields. Catalog operation: esignature:DocGenFormFields_PutEnvelopeDocGenFormFields. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.