---
title: "Get presigned URL for document upload"
method: POST
path: "/api/v1/documents/upload-url"
tags: ["Documents"]
---

# Get presigned URL for document upload

`POST /api/v1/documents/upload-url`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/documents/upload-url`
- Auth: one of:
  - API key in header `X-API-Key`
  - `bearer` (a scheme the document does not define)

## Request body

- CreateUploadUrlDto
  - `sandbox` boolean: Dashboard mode. API keys always use their authenticated mode.
  - `collectionIds` string[]: Explicit destination collections. Omission or [] leaves the resource unassigned.
  - `filename` string, required
  - `contentType` string, required
  - `name` string: What to call the document. The filename is restricted to ASCII because it names the stored file; a name is not. Defaults to the filename. Confirm can still rename it.

## Response `201`

- UploadUrlResponseDto
  - `documentId` string, required
  - `uploadUrl` string, required
  - `key` string, required
  - `maxUploadBytes` number, required: Largest file this organization's plan accepts, in bytes. Uploading a bigger file is rejected when the upload is confirmed, so check it before transferring.

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
