Using the official DocuSign C# SDK, how would I go about replacing a document within an envelope that is still "in process" (hasn't been completed)?

Viewed 125

Using the EnvelopesApi client, I'm honestly not all that sure where to begin. Do I have to call DeleteDocument() with the DocumentId that I want to replace, and then call UpdateDocuments(), passing in only an envelope definition that only includes the document that I'm replacing it with; or do I have to recreate the envelope definition entirely? Or should I instead just call Update(), passing in the new envelope definition with the correct documents? What is the correct/recommended approach for replacing a document within an envelope that is not completed? Is this documented anywhere?

Thank you

1 Answers

First thing first. If your envelope was "sent" which means it is no longer in "draft" (created) state, you cannot change it without using the Correct feature.

Correcting an envelope after it was sent is a specific action meant to allow the original sender to make modifications as allowed by law.

In terms of replacing a document in an envelope, you can use this method:

PUT
/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}

Assuming you know the accountId, envelopeId, and documentId

See more information about this endpoint in Developer Center

Related