# Upload knowledge file

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

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

# Upload knowledge file

Preview

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

Public APIEverruns Cloud and self-hosted Platform

PUT`/v1/knowledge/{collection_id}/upload`

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

## Parameters

### Path Parameters

**collection_id**

required

string

Knowledge collection

### Query Parameters

**path**

required

string

**mime_type**

string | null

## Request Bodyrequired

Media typeapplication/octet-stream

string

## Responses

200Stored streamed original

### 200

Stored streamed original

Media typeapplication/json

### Example generated

```json
example
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/knowledge/example/upload?path=example';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/octet-stream'},
  body: 'example'
};


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

Request

```sh
curl --request PUT \
  --url 'https://app.everruns.com/api/v1/knowledge/example/upload?path=example' \
  --header 'Content-Type: application/octet-stream' \
  --data example
```

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

200

200 · Stored streamed original

No response body example is declared for this status.

## Matching endpoints