---
title: "Upload files"
method: POST
path: "/v1/files/"
tags: ["Files"]
---

# Upload files

`POST /v1/files/`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v1/files/`
- Auth: HTTP bearer

**Auth**: User JWT

Files upload

## Response `200`

```
{
  success: boolean,
  results: [{
    userId: string,
    ownerKey: string,
    location: string,
    locationPreview?: string,
    duration?: string,
    originalname: string,
    filename: string,
    mimetype: string,
    size: string,
    expiresAt: string,
    clientEncrypted: boolean,  // bytes are client-side ciphertext
    isPrivate: string,
    _id: string,
    createdAt: string,
    updatedAt: string,
  }],
}
```

- FilesUploadResponse
  - `success` boolean, required
  - `results` FileRecord[], required
    - `_id` string
    - `userId` string
    - `ownerKey` string
    - `location` string
    - `locationPreview` string, nullable
    - `duration` string, nullable
    - `originalname` string
    - `filename` string
    - `mimetype` string
    - `size` number
    - `expiresAt` string, nullable
    - `isPrivate` boolean, nullable
    - `createdAt` string, nullable
    - `updatedAt` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal server error ``` {error: string} ```

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
