---
title: "Sets the envelope purge configuration for an account."
method: PUT
path: "/v2.1/accounts/{accountId}/settings/envelope_purge_configuration"
tags: ["Accounts"]
---

# Sets the envelope purge configuration for an account.

`PUT /v2.1/accounts/{accountId}/settings/envelope_purge_configuration`

## Request

- Base URL: `https://www.docusign.net/restapi`
- URL: `https://www.docusign.net/restapi/v2.1/accounts/{accountId}/settings/envelope_purge_configuration`
- Auth: none declared

An envelope purge configuration enables account administrators to permanently remove documents and their field data from completed and voided envelopes after a specified retention period (`retentionDays`). This method sets the envelope purge configuration for your account.

**Note:** To use this method, you must be an account administrator.

For more information, see [Purge Envelopes](https://support.docusign.com/s/document-item?bundleId=oeq1643226594604&topicId=edo1578456348066.html).

## Path parameters

- `accountId` string, required

## Request body

- EnvelopePurgeConfiguration: Contains information about the current envelope purge configuration for an account, which enables account administrators to purge documents from completed and voided envelopes after a set number of days (`retentionDays`).
  - `purgeEnvelopes` string: When **true,** purging is enabled.
  - `redactPII` string: When **true,** the system also redacts personally identifiable information (PII). **Note:** To redact PII, you must also set the property `removeTabsAndEnvelopeAttachments` to **true.**
  - `removeTabsAndEnvelopeAttachments` string: When **true,** the system also purges the tabs and attachments associated with the envelopes.
  - `retentionDays` string: The number of days to retain envelope documents before purging them. This value must be a number between `0` and `999`.

## Response `200`

Successful response.

## Other responses

- `400`: Error encountered.

## Changes

- **2019-10-08** (v2) `69cda11bf08a`: 2 info
  - api tag `Accounts` added
  - api tag `EnvelopePurgeConfiguration` removed
- **2019-07-18** (v2) `8ad1b5a40f1b`: 2 info
  - api tag `EnvelopePurgeConfiguration` added
  - api tag `Accounts` removed

[Operation history](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api/changes/v2.1/accounts/:accountId/settings/envelope_purge_configuration/put.md)

---

[API](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api.md) - [All operations](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api/revisions/77f1998c313d?raw)
