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

# Upload a file

`POST /v1/files/upload`

Upload a file and get an `upload_ref` to be used for Identity Document Check or Documents checks.

---

Maximum file size is at most **20MB** but may vary depending on the usage afterward.

The `upload_ref` is valid for about **1 day**.

The accepted file formats are:
- Image files:  
  - `.avif`: AVIF image (`image/avif`)  
  - `.bmp`: Windows OS/2 Bitmap Graphics (`image/bmp`)  
  - `.gif`: Graphics Interchange Format (GIF, `image/gif`)  
  - `.ico`: Icon format (`image/vnd.microsoft.icon`)  
  - `.ico`: Icon format (`image/x-icon`)  
  - `.jpeg, .jpg`: JPEG images (`image/jpeg`)  
  - `.png`: Portable Network Graphics (`image/png`)  
  - `.svg`: Scalable Vector Graphics (SVG, `image/svg+xml`)  
  - `.tif, .tiff`: Tagged Image File Format (TIFF, `image/tiff`)  
  - `.webp`: WEBP image (`image/webp`)  
- Office files:  
  - `.doc`: Microsoft Word (`application/msword`)  
  - `.docx`: Microsoft Word (OpenXML, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`)  
  - `.odp`: OpenDocument presentation document (`application/vnd.oasis.opendocument.presentation`)  
  - `.ods`: OpenDocument spreadsheet document (`application/vnd.oasis.opendocument.spreadsheet`)  
  - `.odt`: OpenDocument text document (`application/vnd.oasis.opendocument.text`)  
  - `.pdf`: Adobe Portable Document Format (PDF, `application/pdf`)  
  - `.ppt`: Microsoft PowerPoint (`application/vnd.ms-powerpoint`)  
  - `.pptx`: Microsoft PowerPoint (OpenXML, `application/vnd.openxmlformats-officedocument.presentationml.presentation`)  
  - `.vsd`: Microsoft Visio (`application/vnd.visio`)  
  - `.xls`: Microsoft Excel (`application/vnd.ms-excel`)  
  - `.xlsx`: Microsoft Excel (OpenXML, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`)  
- Text files:  
  - `.csv`: Comma-separated values (CSV, `text/csv`)  
  - `.json`: JSON format (`application/json`)  
  - `.jsonld`: JSON-LD format (`application/ld+json`)  
  - `.rtf`: Rich Text Format (RTF, `application/rtf`)  
  - `.txt`: Text, (generally ASCII or ISO 8859-n, `text/plain`)  
- Archive files:  
  - `.arc`: Archive document (multiple files embedded, `application/x-freearc`)  
  - `.bz`: BZip archive (`application/x-bzip`)  
  - `.bz2`: BZip2 archive (`application/x-bzip2`)  
  - `.gz`: GZip Compressed Archive (`application/gzip`)  
  - `.rar`: RAR archive (`application/vnd.rar`)  
  - `.tar`: Tape Archive (TAR, `application/x-tar`)  
  - `.zip`: ZIP archive (`application/zip`)  
  - `.7z`: 7-zip archive (`application/x-7z-compressed`)  
  - `.7z`: 7-zip archive on windows (`application/x-compressed`)  
  - `.zip`: ZIP archive on windows (`application/x-zip-compressed`)

---

#### See also  
Learn more about [Files](./files-guide)

## Response `201`

File uploaded and reference ready to be used.

**ℹ️ Click to see full payload**

- UploadedFile
  - `upload_ref` string, required
  - `expired_at` string, date-time, required — Upload ref will expire after this date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)

## Other responses

- `400` — The request is either malformed or contain invalid parameters. - When the file is missing - When the file is empty
- `413` — File too large, maximum file size is **20MB**.
- `415` — File type not supported.

---

[API](https://skmtc.dev/dotfile/apis/api-specifications.md) · [All operations](https://skmtc.dev/dotfile/apis/api-specifications/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotfile/api-specifications/revisions/36393567057b/schema)
