Last updated 2019-07-09 18:36:11 UTC

Code Sample in C#

The CancelEnvelope operation allows removal of an envelope from active status (including any documents contained in the envelope). When this operation is called, any documents contained in the envelope will no longer be available for signing.

Any documents contained in the envelope that were declined or completed prior to the CancelEnvelope operation being called will retain their status of declined or completed and will not be affected by the CancelEnvelope call.

The CancelEnvelope operation requires knowledge of the following:

  • The EnvelopeId of the envelope to cancel (this is returned as an element in the returned XML from an envelope creation operation)
  • The AuthToken of the envelope to cancel (this is returned as an element in the returned XML from n envelope creation operation)
  • The AssureSign account ContextIdentifier (this is exposed in the AssureSign administrative application account settings and serves to provide some security to the transaction)

Additionally, an optional Remarks attribute (128 characters max) may be passed that will be included in the envelope status history record that will be created when this cancellation request is processed.

Sample XML

<?xml version="1.0" encoding="utf-8"?> 
<CancelEnvelope xmlns=""> 
    <Request ContextIdentifier="06C4A84A-693C-46CB-8DF2-40A8215AA056" EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" AuthToken="8CC9A84B-693C-46CC-4342-40A8215AD76A" Remarks="" /> 

The SOAP Action Header is

A simple response is returned echoing the envelope information which will only contain an Exceptions node if some issue has occurred:

<?xml version="1.0" encoding="utf-8"?> 
<CancelEnvelopeResponse xmlns=""> 
    <CancelEnvelopeResult EnvelopeId="2CE11EF1-8938-DD11-8735-00065B8CE99B" /> 

The CancelEnvelopeResult should be checked for the presence of an Exceptions element, which may contain multiple EnvelopeException items.