Deletes documents from a draft envelope
Deletes one or more documents from an existing envelope that has not yet been completed.
To delete a document, use only the relevant parts of the envelopeDefinition.
For example, this request body specifies that you want to delete the document whose documentId is "1".
{ "documents": [ { "documentId": "1" } ]}The envelope status must be one of:
createdsentdelivered
Authorization
OAuth2 OAuth 2.0 access token obtained via Authorization Code Grant or JWT Grant.
In: header
Path Parameters
The external account number (int) or account ID GUID.
The envelope's GUID.
Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec
Response Body
application/json
application/json
curl -X DELETE "https://example.com/v2.1/accounts/string/envelopes/string/documents"{ "envelopeDocuments": [ { "addedRecipientIds": [ "string" ], "agreementType": "string", "agreementTypeSource": "string", "attachmentTabId": "string", "authoritativeCopy": "string", "availableDocumentTypes": [ { "isDefault": "string", "type": "string" } ], "containsPdfFormFields": "string", "display": "string", "docGenDocumentStatus": "string", "docGenErrors": [ { "errorCode": "string", "message": "string", "tagIdentifier": "string" } ], "docGenFormFields": [ { "connectedObjectDetails": { "recordId": "string" }, "defaultValue": "string", "description": "string", "filter": "string", "format": { "expression": "string", "locale": "string" }, "fullyQualifiedPath": "string", "hidden": "string", "label": "string", "name": "string", "options": [ { "description": "string", "label": "string", "selected": "string", "value": "string" } ], "order": "string", "predefinedValidation": "string", "readOnly": "string", "required": "string", "rowValues": [ { "docGenFormFieldList": [ {} ] } ], "type": "string", "validation": { "errorMessage": "string", "expression": "string" }, "value": "string" } ], "documentBase64": "string", "documentFields": [ { "errorDetails": { "errorCode": "string", "message": "string" }, "name": "string", "originalValue": "string", "value": "string" } ], "documentId": "string", "documentIdGuid": "string", "documentTemplateId": "string", "errorDetails": { "errorCode": "string", "message": "string" }, "hasDigitalSignature": "string", "includeInDownload": "string", "isAceGenDocument": "string", "isDocGenDocument": "string", "isEdited": "string", "isExternallyAvailable": "string", "isFlattened": "string", "name": "string", "order": "string", "pages": [ { "dpi": "string", "errorDetails": { "errorCode": "string", "message": "string" }, "height": "string", "imageBytes": "string", "mimeType": "string", "pageId": "string", "sequence": "string", "width": "string" } ], "signerMustAcknowledge": "string", "sizeBytes": "string", "templateLocked": "string", "templateRequired": "string", "type": "string", "uri": "string" } ], "envelopeId": "string"}Gets a list of documents in an envelope GET
Retrieves a list of documents associated with the specified envelope. ### Related topics - [How to list envelope documents](https://developers.docusign.com/docs/esign-rest-api/how-to/list-envelope-documents/)
Adds one or more documents to an existing envelope PUT
Adds one or more documents to an existing envelope. The tabs of the original document will be applied to the new document. **Note:** When adding or modifying documents for an in-process envelope, Docusign recommends [locking the envelope](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopelocks/create/) prior to making any changes. If the file name of a document contains Unicode characters, you need to include a `Content-Disposition` header. Example: **Header:** `Content-Disposition` **Value:** `file; filename=\"name\";fileExtension=ext;documentId=1` **Note:** This method works on documents only. To add recipient or document tabs, use methods from the [EnvelopeRecipientTabs](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/) resource. <ds-inlinemessage kind="warning"> If HTML document files contain <code><img></code> elements with the <code>src</code> attribute set to a path or URL, those images will not be displayed. Images in HTML files must be encoded in Base64 format, like this:<br/> <code><img src="data:image/gif;base64,R0lGODlh...IQAAOw==" alt="Base64 encoded image" width="150" height="150"/></code> </ds-inlinemessage>