# Create File

```
POST 
/v1/files
```

Describe a file and get the form its bytes are uploaded with.

The file starts `pending`. POST `upload.fields` and then the bytes, as the multipart field `file`, to `upload.url`: storage refuses a body whose `Content-Type` is not the declared `contentType` or that is larger than the per-file limit. The form is valid 15 minutes. Then call `POST /v1/files/{id}/complete`. With `withPreview: true` a second form, `previewUpload`, takes a JPEG preview of at most 2 MB.

Accepted types: JPEG, PNG, WebP, HEIC, PDF, Word (docx), Excel (xlsx), PowerPoint (pptx), CSV and plain text. SVG and HTML are refused (415). A file over the per-file limit, one the account's storage quota cannot hold, or one past the month's allowance of new bytes where the plan sets one, is refused (413, `file_too_large`, `storage_quota_exceeded` or `monthly_quota_exceeded` with `remainingBytes`).

Adding files needs the right to add datasets to the folder. In the account's capture folder, and in its uploads folder for chat attachments (`POST /v1/files/batch` with no `folderId`), any member may add files, a Viewer included. The capture folder takes files only while capture is on for the account (403 `feature_not_offered`, `feature` `capture`).

## Request[​](#request "Enlace directo al request")

## Responses[​](#responses "Enlace directo al Responses")

* 201
* 403
* 404
* 422

Successful Response

`error` is `feature_not_offered`: files are not included for this account (`feature` is `files`), or the target is the account's capture folder and capture is not included (`feature` is `capture`). An account admin can switch either on.

Not found

Validation Error
