> 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

# Delete envelope attachments from draft envelope

DELETE https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments
Content-Type: application/json

Deletes one or more envelope attachments from a draft envelope.

It's easy to confuse envelope attachments,
which are developer-only files associated with an envelope,
with signer attachments.

To learn about the different types of attachments, see [Attachments](/docs/esign-rest-api/esign101/concepts/documents/attachments/) in the concept guide.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeattachments/delete

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.
- `envelopeId` (string, required) — The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`

### Body (application/json)

This endpoint expects an envelopeAttachmentsRequest.

- `attachments` (list of attachment, optional) — An object that contains information about the attachment.

## Response

### 200

Successful response.

- `attachments` (list of envelopeAttachment, optional) — An array of attachment objects that contain information about the attachments.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### attachment

Contains information about an attachment.

- `accessControl` (string, optional) — Valid values are `sender` and `senderAndAllRecipients`.
- `attachmentId` (string, optional) — The unique identifier for the attachment.
- `attachmentType` (string, optional) — Specifies the type of the attachment for the recipient.
- `data` (string, optional) — A Base64-encoded representation of the attachment that is used to upload and download the file. File attachments may be up to 50 MB in size.
- `label` (string, optional) — A label for the attachment. Potential values include: - `guidedForm`: [Guided forms](https://www.docusign.com/products/guided-forms) provide a step-by-step, mobile-ready experience to help signers easily complete long or complex forms. - `eventNotifications`: A list of envelope-level event statuses that trigger Connect to send updates to the endpoint specified in the `url` property.
- `name` (string, optional) — The name of the attachment.
- `remoteUrl` (string, optional) — The URL of a previously staged chunked upload. Using a chunked upload enables you to stage a large, chunkable temp file. You then use the `remoteUrl` property to reference the chunked upload as the content in attachment and document-related requests. The `remoteUrl` property cannot be used for downloads.

### envelopeAttachment

- `accessControl` (string, optional) — Valid values are `sender` and `senderAndAllRecipients`.
- `attachmentId` (string, optional) — The unique identifier for the attachment.
- `attachmentType` (string, optional) — Specifies the type of the attachment for the recipient. Possible values are: - `.htm` - `.xml`
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `label` (string, optional)
- `name` (string, optional)

### errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Examples

**Request**

```json
{
  "attachments": [
    {
      "accessControl": "sample string 1",
      "attachmentId": "sample string 2",
      "attachmentType": "sample string 3",
      "data": "sample string 4",
      "label": "sample string 5",
      "name": "sample string 6",
      "remoteUrl": "sample string 7"
    }
  ]
}
```

**Response**

```json
{
  "attachments": [
    {
      "accessControl": "sample string 1",
      "attachmentId": "sample string 2",
      "attachmentType": "sample string 3",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "label": "sample string 4",
      "name": "sample string 5"
    }
  ]
}
```