Generate and Send Envelope (DocuSign Gen)
POST/restapi/v2.1/accounts/:accountId/envelopes/genAndSendEnvelopes
DocuSign Gen-compatible endpoint that resolves the inbound
genTemplateMappings[0].templateId to a previously-imported Propper
template, merges the mapping values into the document, and dispatches
the envelope for signature in a single call.
Requires the docgen.compat.docusign_gen flag to be enabled for the
calling org. When the flag is off the route returns 404 to look
identical to a non-imported template.
Request
Responses
- 201
- 400
- 404
- 422
- 502
Envelope created and sent.
Missing genTemplateMappings[0].templateId.
Template is not imported (Apex should re-run the import wizard) or compat flag disabled.
Template kind is not SIGN_PDF_DOCGEN.
Catalog row is orphaned or BFF dispatch failed.