# Delete image attachment

### URL

<mark style="color:red;">**DELETE**</mark> `https://api.complycube.com/v1/documents/:id/:side`

Deletes an existing image attachment.\
\
You will **not** be able to delete a document image once used to perform a check.

### Headers

<table><thead><tr><th width="260">Name</th><th width="86">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code><mark style="color:red;">*</mark></td><td>string</td><td>The API <strong><code>live</code></strong> or <strong><code>test</code></strong> key.</td></tr></tbody></table>

### Path parameters

<table><thead><tr><th width="260">Name</th><th width="85">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code><mark style="color:red;">*</mark></td><td>string</td><td>The ID of the document.</td></tr><tr><td><code>side</code><mark style="color:red;">*</mark></td><td>string</td><td>The side of the document to delete. Valid values include:<br>1. <code>front</code><br>2. <code>back</code></td></tr></tbody></table>

### Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X DELETE https://api.complycube.com/v1/documents/{:documentId}/{:side} \
     -H 'Authorization: <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

await complycube.document.deleteImage("DOCUMENT_ID","DOCUMENT_SIDE");
```

{% endtab %}

{% tab title="Python" %}

```python
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

cc_api.documents.deleteImage('DOCUMENT_ID','DOCUMENT_SIDE')
```

{% endtab %}

{% tab title="PHP" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$ccapi->documents()->deleteImage('DOCUMENT_ID', 'DOCUMENT_SIDE');
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using ComplyCube.Net;
using ComplyCube.Net.Resources.Documents;

var docApi = new DocumentApi(new ComplyCubeClient("<YOUR_API_KEY>"));

await docApi.DeleteImageAsync("DOCUMENT_ID", "DOCUMENT_SIDE");
```

{% endtab %}
{% endtabs %}

### Example response

{% tabs %}
{% tab title="Success (204)" %}

```
```

{% endtab %}
{% endtabs %}


---

# 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://docs.complycube.com/documentation/api-reference/core-resources/documents/delete-image-attachment.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.
