---
title: "Upload a file (subject to change)"
method: POST
path: "/projects/{projectId}/uploads"
tags: ["Documents", "Preview"]
---

# Upload a file (subject to change)

`POST /projects/{projectId}/uploads`

## Request

- Base URL: `https://app.ketryx.com/api/v1`
- URL: `https://app.ketryx.com/api/v1/projects/{projectId}/uploads`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ketryx/apis/ketryx-api/docs/projects/:projectId/uploads/post.ts> (a function with typed inputs; its response is checked against the schema)

Stores a file and returns its Ketryx ID. The file is inert until a capability-guarded call consumes it, such as `POST /projects/{projectId}/items/documents`. Maximum file size is 300 MB by default (configurable).

## Request body `multipart/form-data`

- object
  - `file` string, binary

## Response `200`

File uploaded successfully

- object
  - `id` string, required: Ketryx ID of the uploaded file
  - `filename` string, required: Filename the file was uploaded under
  - `contentType` string, required: MIME type of the uploaded file
  - `sizeBytes` integer, required: File size in bytes

## Other responses

- `400`: The request is not valid.
- `401`: The requester is not authenticated.
- `403`: The requester is unauthorized.
- `404`: The resource was not found.
- `413`: File too large

---

[API](https://skmtc.dev/ketryx/apis/ketryx-api.md) - [All operations](https://skmtc.dev/ketryx/apis/ketryx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ketryx/apis/ketryx-api/revisions/a2a484dc35ca?raw)
