# Files

Seliom provides you with a file repository to store all files in your organization. You can upload files to your repository with our public API.

{% hint style="danger" %}
Dont forget to include the **Authorization** and **X-Organization** headers in every request. They have been omitted from these endpoints for brevity.&#x20;
{% endhint %}

## Upload File

<mark style="color:green;">`POST`</mark> `https://api.seliom.com/upload`

This endpoint uploads a file to your organization's repository and returns its **File ID.**

#### Request Body

| Name | Type   | Description                                                                                                                                |
| ---- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| name | string | Name of the file you are uploading.                                                                                                        |
| file | object | File object with the keys **data** and **type**. Currently only the type **Buffer** is supported. Therefore, data should be a byte buffer. |

{% tabs %}
{% tab title="200 Successful response" %}

```
{
   "fileId": "a27fudi8-e830-47c9-8e28-60448937d0e2/1616008578647_file.pdf"
}
```

{% endtab %}

{% tab title="500 Error" %}

```
{
   "message": "An error occured uploading your file. Please make sure you are sending the required parameters and try again."
}
```

{% endtab %}
{% endtabs %}
