---
title: "Upload files for Chat"
method: POST
path: "/rest/api/v1/uploadchatfiles"
tags: ["Chat"]
---

# Upload files for Chat

`POST /rest/api/v1/uploadchatfiles`

Upload files for Chat.

## Query parameters

- `locale` string
- `timezoneOffset` integer

## Response `200`

OK

- UploadChatFilesResponse
  - `files` ChatFile[] — Files uploaded for chat.
    - `id` string — Unique identifier of the file.
    - `url` string — Url of the file.
    - `name` string — Name of the uploaded file.
    - `metadata` ChatFileMetadata — Metadata of a file uploaded by a user for Chat.
      - `status` 'PROCESSING' | 'PROCESSED' | 'PARTIALLY_PROCESSED' | 'FAILED' | 'DELETED' — Current status of the file.
      - `uploadTime` integer — Upload time, in epoch seconds.
      - `processedSize` integer — Size of the processed file in bytes.
      - `failureReason` 'PARSE_FAILED' | 'AV_SCAN_FAILED' | 'FILE_TOO_SMALL' | 'FILE_TOO_LARGE' | 'FILE_EXTENSION_UNSUPPORTED' | 'FILE_METADATA_VALIDATION_FAIL' | 'FILE_PROCESSING_TIMED_OUT' | 'OAUTH_NEEDED' | 'URL_FETCH_FAILED' | 'EMPTY_CONTENT' | 'AUTH_REQUIRED' — Reason for failed status.
      - `mimeType` string — MIME type of the file.

## Other responses

- `400` — Invalid request
- `401` — Not Authorized
- `403` — Forbidden
- `429` — Too Many Requests

---

[API](https://skmtc.net/gleanwork/apis/glean-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-api/revisions/ebd602e4aea4/schema)
