Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.accountIdstringRequired within parent
path.envelopeIdstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.update_docgen_formfields_onlystringOptional
bodyModelOptionalExpand Updates sender fields for an envelope — request body — body

Referenced models: Updates sender fields for an envelope — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Returns sender fields for an envelope — response body

Referenced models: Returns sender fields for an envelope — response body

1 more schema is linked from the tables above, on the schema pages.

Returns sender fields for an envelope — response body
FieldTypePresenceDescription and constraints
$objectRootAn object for document generation responses.
docGenFormFieldsarrayOptionalA list of `docGenFormFields` objects.
docGenFormFields[]ModelEach itemExpand Returns sender fields for an envelope — response body — doc Gen Form Fields item
errorDetailsModelOptionalExpand 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
FieldTypePresenceDescription and constraints
$objectRootThis object maps the document generation fields to their values.
docGenFormFieldsarrayOptionalA list of `docGenFormFields` objects.
docGenFormFields[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootA collection of document generation fields.
docGenDocumentStatusstringOptionalThe 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/

docGenErrorsarrayOptionalA list of `docGenSyntaxError` objects.
docGenErrors[]ModelEach itemExpand Updates a template document — response body — doc Gen Errors item
docGenFormFieldListarrayOptionalA list of `docGenFormField` objects.
docGenFormFieldList[]ModelEach itemExpand Updates a template document — response body — doc Gen Form Fields item
documentIdstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootThis object describes errors that occur. It is only valid for responses and ignored in requests.
errorCodestringOptionalThe code associated with the error condition.
messagestringOptionalA brief message describing the error condition.
Updates a template document — response body — doc Gen Form Fields item
FieldTypePresenceDescription and constraints
$objectRootThe 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.
connectedObjectDetailsModelOptionalExpand Returns tabs on a template — response body — ssn Tabs item connected Object Details
defaultValuestringOptional
descriptionstringOptionalA description of the field. Displayed with the label.
filterstringOptionalAn object used to present a filtered view of the items in a folder.
formatModelOptionalExpand Updates a template document — response body — doc Gen Form Fields item format
fullyQualifiedPathstringOptional
hiddenstringOptional
labelstringOptionalA label displayed near the field.
namestringOptionalThe name of the sender field.

Required for PUT requests.
optionsarrayOptionalWhen `type` is `Select`, this array describes the available options.
options[]ModelEach itemExpand Updates a template document — response body — doc Gen Form Fields item options item
orderstringOptionalThe order in which to sort the results.

Valid values are:


* `asc`: Ascending order.
* `desc`: Descending order.
predefinedValidationstringOptionalReserved for Docusign.
readOnlystringOptional
requiredstringOptionalWhen **true,** the field is required.
rowValuesarrayOptionalFor 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[]ModelEach itemExpand Updates a template document — response body — doc Gen Form Fields item row Values item
typestringOptionalThe kind of data the sender field holds. Valid values:

- `TextBox`
- `Date`
- `Number`
- `Select`
- `TableRow`
validationModelOptionalExpand Updates a template document — response body — doc Gen Form Fields item validation
Describes how values are validated.
valuestringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootDescribes document generation errors.
errorCodestringOptionalA code associated with the error condition.
messagestringOptionalThe error message.
tagIdentifierstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRoot
recordIdstringOptional
Updates a template document — response body — doc Gen Form Fields item options item
FieldTypePresenceDescription and constraints
$objectRootSpecifies an individual option setting when type is `Select`.
descriptionstringOptionalDescription of the selectable option.
labelstringOptionalThe label for the selectable option.
selectedstringOptionalWhen **true,** the option is selected.
valuestringOptionalSpecifies 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
FieldTypePresenceDescription and constraints
$objectRootAn object representing a row of a dynamic table.
docGenFormFieldListarrayOptionalThe 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[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootDescribes how values are validated.
errorMessagestringOptionalThe error message when validation fails.
expressionstringOptionalThe expression used to validate values.

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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.