> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Status & Managing Group PurgeDocumentsAndMetaData

## PurgeDocumentsAndMetaData

This method can be used to purge envelope documents and metadata from the Docusign system. The metadata that is removed along with the document includes the Docusign tab data and any attachments that were provided with the envelope creation request. In all other respects, this is identical to [PurgeDocuments](/docs/esign-soap-api/reference/status-and-managing-group/purgedocuments).

When this method is used, the envelope documents are placed in a purge queue for deletion in 14 days. A warning email notification is sent to the sender and recipients associated with the envelope notifying them that the envelope document will be deleted in 14 days and providing a link to the documents. Another email is sent 7 days later with the same message. At the end of the 14-day period, the envelope documents and metadata are deleted from the system.

### Schema

| Name       | Schema Type | Description                           |
| ---------- | ----------- | ------------------------------------- |
| EnvelopeId | DSXId       | Envelope ID to purge from the system. |

#### Sample Request XML

```
POST /api/3.0/dsapi.asmx HTTP/1.1
Host: demo.docusign.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.docusign.net/API/3.0/PurgeDocumentsAndMetaData"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap: Body>
    <PurgeDocumentsAndMetaData xmlns="http://www.docusign.net/API/3.0">
      <EnvelopeID>string</EnvelopeID>
    </PurgeDocumentsAndMetaData>
  </soap:Body>
</soap:Envelope>
```

The response either a success or failure. If the call fails an [error code](/docs/esign-rest-api/esign101/error-codes) is provided.

#### Sample Response XML

```
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap: Body>
    <PurgeDocumentsAndMetaDataResponse xmlns="http://www.docusign.net/API/3.0">
      <PurgeDocumentsAndMetaDataResult>
        <PurgeDocumentSuccess>boolean</PurgeDocumentSuccess>
        <PurgeDocumentError>string</PurgeDocumentError>
      </PurgeDocumentsAndMetaDataResult>
    </PurgeDocumentsAndMetaDataResponse>
  </soap:Body>
```