# Update knowledge file metadata

Source: <https://everruns.com/docs/api/operations/update_knowledge_file_metadata/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Knowledge & memory](https://everruns.com/docs/api/groups/knowledge-memory/)/Update knowledge file metadata

# Update knowledge file metadata

Preview

Give agents persistent memory and versioned file collections. Manage sources, files and optional search indexes.

Public APIEverruns Cloud and self-hosted Platform

PATCH`/v1/knowledge/{collection_id}/files`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**collection_id**

required

string

Knowledge collection

## Request Bodyrequired

Media typeapplication/json

Update managed-file annotations and agent visibility without extracting bytes again.

object

**indexable**

Optional indexing override. Omit to preserve the current policy.

boolean | null

**metadata**

Replace user annotations while preserving metadata parsed from the original file.

**path**

required

Existing collection-relative file path.

string

**readable**

Optional agent-read override. Omit to preserve the current policy.

boolean | null

### Example generated

```json
{
  "indexable": true,
  "metadata": "example",
  "path": "example",
  "readable": true
}
```

## Responses

200Updated file metadata and policy

### 200

Updated file metadata and policy

Media typeapplication/json

### Example generated

```json
example
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/knowledge/example/files';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"indexable":true,"metadata":"example","path":"example","readable":true}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request PATCH \
  --url https://app.everruns.com/api/v1/knowledge/example/files \
  --header 'Content-Type: application/json' \
  --data '{ "indexable": true, "metadata": "example", "path": "example", "readable": true }'
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Updated file metadata and policy

No response body example is declared for this status.

## Matching endpoints