> For the complete documentation index, see [llms.txt](https://40factory.gitbook.io/wilson/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://40factory.gitbook.io/wilson/3.12/rest-api/knowledge-base/edit-document-metadata.md).

# Edit document metadata

Edit document metadata.

## Request <a href="#request" id="request"></a>

### Url

```
PATCH 
https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base/<object_id>/metadata
```

### Headers

<pre><code><strong>AUTH
</strong>Bearer "eyJ0eXAiOiJKV1QiLCJub25jZSI6IndUZXphSTNjdTNVYj..."
</code></pre>

### Parameters

```
No parameters are required for this endpoint.
```

### Body

```json
{
    "loader_type": "STANDARD",
    "auto_description": false,
    "description": "File description",
    "csv_delimiter": "comma",
    "image_min_size_ratio": 0.3,
    "tags": ["683633c22173dda..."]
}
```

The request body is in JSON format contain following properties:

* `loader_type` (string): Loader type: `ADVANCED` or `STANDARD`
* `auto_description` (boolean): If true, description to be autogenerated
* `description` (string): Description (if not to be autogenerated)
* `csv_delimiter` (string): If file csv, usesful to detect delimiter: `comma`, `semicolon` or `tab`
* `image_min_size_ratio` (number): Minimum image size to be extracted as a percentage of the page area
* `tags` (string array): List of tags (id) to associate to document

***

## Response&#x20;

```json
{
    "id": "683630c11173dda..."
}
```

The response is in JSON format contain following properties:

* `id` (string): Document id

***

## Code example

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

```python
import requests
import json

url = "https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base/<object_id>/metadata"

payload = {
  "loader_type": "STANDARD",
  "auto_description": false,
  "description": "File description",
  "csv_delimiter": "comma",
  "image_min_size_ratio": 0.3,
  "tags": ["683633c22173dda..."]
}
headers = {
  'Authorization': '••••••'
}

response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```powershell
curl --location 'https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base/<object_id>/metadata' \
--header 'Authorization: ••••••' \
--data '{
    "loader_type": "STANDARD",
    "auto_description": false,
    "description": "File description",
    "csv_delimiter": "comma",
    "image_min_size_ratio": 0.3,
    "tags": ["683633c22173dda..."]
}'
```

{% endtab %}
{% endtabs %}
