> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkeia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload de Arquivo

> Permite enviar um arquivo para o sistema.

## Endpoint

`POST /upload-file`

**Autenticação**\
Requer cabeçalho `authorization: <seu_token>`.

## Parâmetros

Envie o arquivo como **base64**.

```json theme={null}
{
  "file": "arquivo em base64",
  "filename" : "nome do arquivo"
}
```

| Nome     | Tipo   | Obrigatório | Descrição       |
| -------- | ------ | ----------- | --------------- |
| file     | base64 | Sim         | arquivo         |
| filename | string | Sim         | nome do arquivo |

## Corpo da requisição

Envie o arquivo como **base64**.

## Exemplo (cURL)

```bash theme={null}
curl -X POST "https://gateway.orkeia.ai/upload-file"   -H "authorization:  <seu_token>"   -F "file=@/caminho/do/arquivo.txt"
```

## Respostas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": "document path url"
}
```

### 500 — Bad Request

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
