# Upload file(s)

`POST /api/file`

URL: https://repsona.com/api/post-file

Uploads one or more files not tied to a project. Send multipart/form-data with one or more parts named `file`; each part's filename is kept as the file name (max 100 MB per file).

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `file` | body | file | required | The file to upload. Its filename is kept as the file name. Repeat the part to upload several files. |

## Request

```sh
curl -X POST "https://<space>.repsona.com/api/file" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -F "file=@screenshot.png"
```

## Responses

- 200: Uploaded files
- 400: Invalid multipart payload or quota exceeded
- 401: Authentication is required

## Example response

```json
{
  "files": [
    {
      "id": 60,
      "hash": "a77661cf-f741-4981-af91-362572c5e0b4",
      "size": 68,
      "type": "image/png",
      "filename": "screenshot.png"
    }
  ]
}
```
