# Public Files

## Returns a list of the public files

<mark style="color:blue;">`GET`</mark> `/public-files`

The list returned does not contain the contents of the files.&#x20;

{% tabs %}
{% tab title="200: OK " %}

```javascript
[
  {
    "filename": "test.txt"
  }
]
```

{% endtab %}
{% endtabs %}

## Upload a public file

<mark style="color:green;">`POST`</mark> `/public-files`

#### Request Body

| Name                                       | Type   | Description             |
| ------------------------------------------ | ------ | ----------------------- |
| filename<mark style="color:red;">\*</mark> | String | The name for the file   |
| file<mark style="color:red;">\*</mark>     | File   | The file to be uploaded |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{ "ok": true }
```

{% endtab %}
{% endtabs %}

## Removes a public file

<mark style="color:red;">`DELETE`</mark> `/public-files/:filename`

#### Path Parameters

| Name                                       | Type   | Description                             |
| ------------------------------------------ | ------ | --------------------------------------- |
| filename<mark style="color:red;">\*</mark> | String | The name of the file you want to remove |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{ "ok": true }
```

{% endtab %}
{% endtabs %}
