Skip to content
Proud to collaborate with Microsoft for Startups

docusign.accounts.put-envelope-purge-configuration ​

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.

Sets the envelope purge configuration for an account.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-docusign
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
purgeenvelopesstringNo—When true, purging is enabled.
redactpiistringNo—When true, the system also redacts personally identifiable information (PII). Note: To redact PII, you must also set the property removeTabsAndEnvelopeAttachments to true.
removetabsandenvelopeattachmentsstringNo—When true, the system also purges the tabs and attachments associated with the envelopes.
retentiondaysstringNo—The number of days to retain envelope documents before purging them. This value must be a number between 0 and 999.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
purgeenvelopesstringNo—When true, purging is enabled.
redactpiistringNo—When true, the system also redacts personally identifiable information (PII). Note: To redact PII, you must also set the property removeTabsAndEnvelopeAttachments to true.
removetabsandenvelopeattachmentsstringNo—When true, the system also purges the tabs and attachments associated with the envelopes.
retentiondaysstringNo—The number of days to retain envelope documents before purging them. This value must be a number between 0 and 999.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call PUT /v2.1/accounts/{accountId}/settings/envelope_purge_configuration
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform PUT /v2.1/accounts/{accountId}/settings/envelope_purge_configuration
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "docusign.accounts.put-envelope-purge-configuration",
  "initial_data": {
    "base_url": "value",
    "accountid": "value"
  }
}