# Uploading a File

## Upload a File

<mark style="color:green;">`POST`</mark> `https://fileio.couchdrop.io/file/upload`

This endpoint allows you to upload files

#### Query Parameters

| Name    | Type   | Description                                                                                     |
| ------- | ------ | ----------------------------------------------------------------------------------------------- |
| path    | string | Path to upload destination                                                                      |
| size    | number | File size                                                                                       |
| modtime | number | Last modified time. (Not all storage providers support the specification of modtimes on upload) |

#### Headers

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| token | string | API Access Token |

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| data | object | File object to upload |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{}
```

{% endtab %}

{% tab title="403 Permission denied" %}

```
{"error": "you cannot write to that folder"}
```

{% endtab %}
{% endtabs %}
