> For the complete documentation index, see [llms.txt](https://docs.seliom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seliom.com/api/files.md).

# 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seliom.com/api/files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
