Skip to main content

Set Envelope DocGen Form Fields

PUT 

/restapi/v2.1/accounts/:accountId/envelopes/:envelopeId/docGenFormFields

Stages sender-side merge field values on a draft envelope. Translates the DocuSign EnvelopeDocGenFormFields request body into a { name → value } override map and persists it on the agreement's formFieldsJson JSON column under a namespaced sub-key.

Only allowed while the envelope is in CREATED (DocuSign draft) status — any other status returns 400 ENVELOPE_NOT_DRAFT because the source documents have already been rendered + sent.

Accepts either documents[] or envelopeDocGenFormFields[] at the top level (DocuSign Apex SDK has historically posted both).

Audit: writes docgen.compat.docusign_gen.formfields_set with { envelopeId, fieldCount } — field names and values are never logged or persisted in audit metadata.

Request

Responses

Echo of the resolved field model with applied overrides.