# Redact image attachment

### URL

<mark style="color:green;">**POST**</mark> `https://api.complycube.com/v1/documents/:id/redact`

Redacts all instances of document image attachments, including those that were used in [checks](/documentation/api-reference/core-resources/checks.md).

### Headers

<table><thead><tr><th width="218">Name</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Content-Type</code><mark style="color:red;">*</mark></td><td>string</td><td>The content-type must always be set to <code>application/json</code>.</td></tr><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="219">Name</th><th width="101">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></tbody></table>

### Body

<table><thead><tr><th width="222">Name</th><th width="89">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributes</code><mark style="color:red;">*</mark></td><td>array</td><td>The list of <a href="#attributes">attributes</a> to redact from the document image.</td></tr></tbody></table>

### Attributes

| Event    | Description                                                        |
| -------- | ------------------------------------------------------------------ |
| `images` | This will redact the entire front and back images of the document. |

### Example request

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

```bash
curl -X POST https://api.complycube.com/v1/documents/{:documentId}/redact \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
               "attributes": [
                      "images"
               ]
        }' 
```

{% endtab %}
{% endtabs %}

### Example response

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

```json
{}
```

{% 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/upload-image-attachment-1.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.
