# Attachment Delete

### Overview

Deletes an attachment.

### API URI

This is the URI OpsHub will execute to call this API:

```bash
DELETE: entities/{entityTypeId}/{entityId}/attachments? 
attachmentId={attachmentId}& 
projectId={projectId}&
attachmentContainer={attachmentContainer}&
containerItemId={containerItemId}
```

### URI Parameters

| Name                | In    | Required | Type   | Description                                                                                                                                                                                     |
| ------------------- | ----- | -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| entityTypeId        | path  | True     | String | ‘id’ of entity type for given entity id                                                                                                                                                         |
| entityId            | path  | True     | String | ‘id’ of the entity in which attachment to be deleted                                                                                                                                            |
| attachmentId        | path  | True     | String | Id of the attachment that needs to be deleted                                                                                                                                                   |
| projectId           | query | True     | String | Project in which the given entity exists                                                                                                                                                        |
| attachmentContainer | query | False    | String | <p>Name of the container (field) in which the attachment to be deleted.<br>For example, if the attachment is to be deleted from 'Steps' field,<br>attachmentContainer="Steps"</p>               |
| containerItemId     | query | False    | String | <p>Id of the container (field) in which the attachment to be deleted.<br>For example, if the attachment is to be deleted from 'Steps' field, provide step id,<br>containerItemId="10409526"</p> |

### Request Payload

This API does not require a request body. Only HTTP status `204` is returned on successful deletion.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://opstech.gitbook.io/opstech-docs/7.223/connector-sdk-index/sdk-connector-apis/attachment-delete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
