Skip to main content

Set Envelope DocGen Form Fields

PUT 

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

Sets merge field values on a draft envelope. Send docGenFormFields[] with each document's fields under docGenFormFieldList (the shape the Docusign SDKs send); a TableRow field takes its rows in rowValues. Values are held on the draft and merged into the document when the envelope is sent (PUT /envelopes/{envelopeId} with status: sent), so the signer receives the document with these values; they replace any value the envelope was generated with.

Only allowed while the envelope is a draft — once it has been sent the call returns 400 ENVELOPE_NOT_DRAFT, because the signer already has the document.

documents[] and envelopeDocGenFormFields[] (fields under docGenFormFields) are also accepted, as the Docusign Apex SDK has historically posted them.

Field names and values are never logged or stored in audit metadata.

Request​

Responses​

Echo of the field model with the values now set on the draft.

Response Headers
    X-Request-Id

    Correlation id for this request, returned on every response (success and error). Quote it when contacting support to pinpoint the exact request, and use it to correlate your own logs. It is the same 128-bit id as the trace-id segment of the traceparent header.

    traceparent

    W3C Trace Context identifier for this request, returned on every response. Send your own traceparent on a request to have it adopted, so a multi-call workflow shares one trace. Format: 00-<32-hex trace-id>-<16-hex span-id>-<2-hex flags>.