Delete completed envelope via sdk

Delete completed envelope via sdk

Problem Description:

Is it possible to delete a completed envelope via c# sdk? My business logic need something like this.

I’ve tried to void it, but unsuccessfully, It appears that only in-progress envelopes can be voided.

Solution – 1

// Delete an envelope
ApiClient apiClient = new ApiClient(basePath);
// You will need to obtain an access token using your chosen authentication method
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
FoldersApi foldersApi = new FoldersApi(apiClient);
string envelopeId = "9e2b1deb-xxxx-xxxx-xxxx-2540322a31c4";
FoldersRequest folderRequest = new FoldersRequest();
folderRequest.EnvelopeIds = new List<string>();
folderRequest.EnvelopeIds.Add(envelopeId);
foldersApi.MoveEnvelopes(accountId, "recyclebin", folderRequest);

More information https://www.docusign.com/blog/developers/common-api-tasks-delete-and-undelete-envelope

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Reject